diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-08 19:21:33 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-08 19:21:33 +0000 |
commit | 7fe9b4257039e4cb0c5503ad0ceceed82dda257f (patch) | |
tree | 3e7b5c6fc01692dae73e79052c41bdbbef6e460b /gcc | |
parent | 6b1a9af35550da2444e2ea9b38d19d12e6056e77 (diff) | |
download | gcc-7fe9b4257039e4cb0c5503ad0ceceed82dda257f.tar.gz |
PR debug/39834
* gcc.dg/torture/pr39834.c
PR middle-end/39834
* cgraphunit.c (save_inline_function_body): Do not copy transform hooks
for saved inline bodies.
* ipa-passes.c (do_per_function): Do not add the hoks multiple times
for given function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148292 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/cgraphunit.c | 3 | ||||
-rw-r--r-- | gcc/passes.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr39834.c | 13 |
5 files changed, 31 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 594c0a6e84f..233028faa06 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2009-06-08 Jan Hubicka <jh@suse.cz> + + PR middle-end/39834 + * cgraphunit.c (save_inline_function_body): Do not copy transform hooks + for saved inline bodies. + * ipa-passes.c (do_per_function): Do not add the hoks multiple times + for given function. + 2009-06-08 Adam Nemet <anemet@caviumnetworks.com> * jump.c (returnjump_p): Handle delayed branches. Add missing diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 70b2682449f..907488c1431 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -1688,6 +1688,9 @@ save_inline_function_body (struct cgraph_node *node) DECL_ONE_ONLY (first_clone->decl) = 0; TREE_PUBLIC (first_clone->decl) = 0; DECL_COMDAT (first_clone->decl) = 0; + VEC_free (ipa_opt_pass, heap, + DECL_STRUCT_FUNCTION (first_clone->decl)->ipa_transforms_to_apply); + DECL_STRUCT_FUNCTION (first_clone->decl)->ipa_transforms_to_apply = NULL; #ifdef ENABLE_CHECKING verify_cgraph_node (first_clone); diff --git a/gcc/passes.c b/gcc/passes.c index 2408668c083..f146670efd1 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -844,7 +844,8 @@ do_per_function (void (*callback) (void *data), void *data) { struct cgraph_node *node; for (node = cgraph_nodes; node; node = node->next) - if (node->analyzed && gimple_has_body_p (node->decl)) + if (node->analyzed && gimple_has_body_p (node->decl) + && (!node->clone_of || node->decl != node->clone_of->decl)) { push_cfun (DECL_STRUCT_FUNCTION (node->decl)); current_function_decl = node->decl; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 56dc2bc1189..e20679a9ba3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2009-06-08 Jan Hubicka <jh@suse.cz> + PR debug/39834 + * gcc.dg/torture/pr39834.c + +2009-06-08 Jan Hubicka <jh@suse.cz> + PR middle-end/40102 * g++.dg/torture/pr40102.C: New testcase. diff --git a/gcc/testsuite/gcc.c-torture/compile/pr39834.c b/gcc/testsuite/gcc.c-torture/compile/pr39834.c new file mode 100644 index 00000000000..ecc3977a1f0 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr39834.c @@ -0,0 +1,13 @@ +/* { dg-options "-O1 -Winline" } */ +void quit_mined (); +void bottom_line (); +typedef enum { False, True } FLAG; +inline void +nextfile (FLAG exitiflast) +{ + if (exitiflast) + quit_mined (); + else + bottom_line (); + nextfile (True); +} |