diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pr52045.c | 11 | ||||
-rw-r--r-- | gcc/tree-optimize.c | 6 |
4 files changed, 26 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9414b24..e62c447 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,12 @@ 2012-01-30 Richard Guenther <rguenther@suse.de> PR tree-optimization/52045 + * tree-optimize.c (execute_cleanup_cfg_post_optimizing): Update + SSA form if cfgcleanup did anything. + +2012-01-30 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/52045 * ipa-inline-transform.c (inline_transform): Call execute_fixup_cfg before computing final todo. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 77ad64d..65a9a7a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-01-30 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/52045 + * gcc.dg/pr52045.c: New testcase. + 2012-01-30 Greta Yorsh <Greta.Yorsh@arm.com> * gcc.target/arm/di-longlong64-sync-withldrexd.c: Accept diff --git a/gcc/testsuite/gcc.dg/pr52045.c b/gcc/testsuite/gcc.dg/pr52045.c new file mode 100644 index 0000000..888ddb6 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr52045.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -ftracer -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dce" } */ + +char *vx; +char buf[20]; + +void +foo (void) +{ + vx = __builtin___stpcpy_chk (buf, vx ? "gh" : "e", sizeof(buf)); +} diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c index d242204..3d18d20 100644 --- a/gcc/tree-optimize.c +++ b/gcc/tree-optimize.c @@ -157,7 +157,9 @@ struct gimple_opt_pass pass_all_early_optimizations = static unsigned int execute_cleanup_cfg_post_optimizing (void) { - cleanup_tree_cfg (); + unsigned int todo = 0; + if (cleanup_tree_cfg ()) + todo |= TODO_update_ssa; maybe_remove_unreachable_handlers (); cleanup_dead_labels (); group_case_labels (); @@ -190,7 +192,7 @@ execute_cleanup_cfg_post_optimizing (void) } } } - return 0; + return todo; } struct gimple_opt_pass pass_cleanup_cfg_post_optimizing = |