diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-15 15:24:19 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-02-15 15:24:19 +0000 |
commit | b75537fbba14a1aad9133dd217e0e102c45b1d2c (patch) | |
tree | 84bac3426747a9ff72e762dc1ff06bfc9e4f61f7 /gcc/tree-ssa-forwprop.c | |
parent | fda1cb5dc616e2f007ab66c64b1e9e5b5e37d56a (diff) | |
download | gcc-b75537fbba14a1aad9133dd217e0e102c45b1d2c.tar.gz |
2008-02-15 Richard Guenther <rguenther@suse.de>
Zdenek Dvorak <ook@ucw.cz>
PR tree-optimization/35164
* tree-flow.h (stmt_references_abnormal_ssa_name): Declare.
* tree-dfa.c (stmt_references_abnormal_ssa_name): New function.
* tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars):
Only propagate addresses which do not have abnormal SSA_NAMEs
in their operands.
* g++.dg/torture/pr35164-1.C: New testcase.
* g++.dg/torture/pr35164-2.C: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132345 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-forwprop.c')
-rw-r--r-- | gcc/tree-ssa-forwprop.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index 2da17c8827d..91bd6179dfa 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -968,7 +968,8 @@ tree_ssa_forward_propagate_single_use_vars (void) && types_compatible_p (TREE_TYPE (TREE_TYPE (TREE_OPERAND (rhs, 0))), TREE_TYPE (TREE_TYPE (rhs))))) { - if (forward_propagate_addr_expr (lhs, rhs)) + if (!stmt_references_abnormal_ssa_name (stmt) + && forward_propagate_addr_expr (lhs, rhs)) { release_defs (stmt); todoflags |= TODO_remove_unused_locals; |