diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-03-14 12:50:10 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-03-14 12:50:10 +0000 |
commit | 21658abb763f2fc0056d292a74415e1368a7907c (patch) | |
tree | 19e4dea139dd060d0cd57bb423461e38b906afee | |
parent | 4b4d4c92772cf52dd0eb0bf7696f71dbc4a1a179 (diff) | |
download | gcc-21658abb763f2fc0056d292a74415e1368a7907c.tar.gz |
2006-03-14 Richard Guenther <rguenther@suse.de>
PR tree-optimization/26672
* tree-ssa-propagate.c (set_rhs): Don't walk DEFs if not in
SSA form.
* gcc.dg/torture/pr26672.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112050 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr26672.c | 8 | ||||
-rw-r--r-- | gcc/tree-ssa-propagate.c | 3 |
4 files changed, 21 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 63d589b0e7b..813e37d6954 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2006-03-14 Richard Guenther <rguenther@suse.de> + PR tree-optimization/26672 + * tree-ssa-propagate.c (set_rhs): Don't walk DEFs if not in + SSA form. + +2006-03-14 Richard Guenther <rguenther@suse.de> + PR tree-optimization/26667 * ipa-inline.c (cgraph_check_inline_limits): Walk the correct node for the callees. Always allow inlining if it will shrink diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5d89febca76..e955f5ef9dd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-03-14 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/26672 + * gcc.dg/torture/pr26672.c: New testcase. + 2006-03-14 Joseph S. Myers <joseph@codesourcery.com> * gcc.target/powerpc/405-dlmzb-strlen-1.c, diff --git a/gcc/testsuite/gcc.dg/torture/pr26672.c b/gcc/testsuite/gcc.dg/torture/pr26672.c new file mode 100644 index 00000000000..b13b5dcaef7 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr26672.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ + +int printf(const char *format, ...); +extern const char help_string[]; +void app_opts(void) { + printf("%s", help_string); +} +const char help_string[] = "foo\n"; diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c index dcdc6add4dd..00d5a945889 100644 --- a/gcc/tree-ssa-propagate.c +++ b/gcc/tree-ssa-propagate.c @@ -632,7 +632,8 @@ set_rhs (tree *stmt_p, tree expr) *stmt_p = TREE_SIDE_EFFECTS (expr) ? expr : build_empty_stmt (); (*stmt_p)->common.ann = (tree_ann_t) ann; - if (TREE_SIDE_EFFECTS (expr)) + if (in_ssa_p + && TREE_SIDE_EFFECTS (expr)) { /* Fix all the SSA_NAMEs created by *STMT_P to point to its new replacement. */ |