diff options
author | Richard Guenther <rguenther@suse.de> | 2010-11-02 16:58:40 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-11-02 16:58:40 +0000 |
commit | f26aa48e06db4d1e6724bfbc52ba466965719668 (patch) | |
tree | 9ed5db3925f00418a13c0fde2957e6db30f7f132 /gcc/tree-ssa-forwprop.c | |
parent | 23d50abbe40cec73fdd660e736a96684e695f069 (diff) | |
download | gcc-f26aa48e06db4d1e6724bfbc52ba466965719668.zip gcc-f26aa48e06db4d1e6724bfbc52ba466965719668.tar.gz gcc-f26aa48e06db4d1e6724bfbc52ba466965719668.tar.bz2 |
re PR tree-optimization/46216 (ICE: SSA corruption)
2010-11-02 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46216
* tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars):
Check if we can propagate from a POINTER_PLUS_EXPR before doing so.
* gcc.dg/torture/pr46216.c: New testcase.
From-SVN: r166203
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 f4808e7..a828408 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -1983,7 +1983,8 @@ tree_ssa_forward_propagate_single_use_vars (void) else gsi_next (&gsi); } - else if (gimple_assign_rhs_code (stmt) == POINTER_PLUS_EXPR) + else if (gimple_assign_rhs_code (stmt) == POINTER_PLUS_EXPR + && can_propagate_from (stmt)) { if (TREE_CODE (gimple_assign_rhs2 (stmt)) == INTEGER_CST /* ??? Better adjust the interface to that function |