This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tuples] Fix pre-cfg dumps for C++ ctors/dtors
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Diego Novillo <dnovillo at google dot com>, Aldy Hernandez <aldyh at redhat dot com>
- Date: Wed, 16 Jul 2008 15:44:14 -0400
- Subject: [tuples] Fix pre-cfg dumps for C++ ctors/dtors
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
This patch in addition to fixing a small memory wastage fixes *.useless ..
*.eh dumps for C++ ctors/dtors. maybe_clone_body calls
start_preparsed_function which sets DECL_SAVED_TREE for the clone to
an empty stmt list and finish_function finalizes that. But we already
have gimple_body for the clone, so shouldn't have DECL_SAVED_TREE.
Bootstrapped/regtested with all the other patches on x86_64-linux, will
commit momentarily.
2008-07-16 Jakub Jelinek <jakub@redhat.com>
* optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
--- gcc/cp/optimize.c.jj 2008-06-13 14:29:48.000000000 +0200
+++ gcc/cp/optimize.c 2008-07-16 19:07:32.000000000 +0200
@@ -1,5 +1,5 @@
/* Perform optimizations on tree structure.
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2007
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2007, 2008
Free Software Foundation, Inc.
Written by Mark Michell (mark@codesourcery.com).
@@ -233,6 +233,7 @@ maybe_clone_body (tree fn)
/* Now, expand this function into RTL, if appropriate. */
finish_function (0);
BLOCK_ABSTRACT_ORIGIN (DECL_INITIAL (clone)) = DECL_INITIAL (fn);
+ DECL_SAVED_TREE (clone) = NULL;
expand_or_defer_fn (clone);
first = false;
}
Jakub