aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivopts.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-04-01 16:18:07 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-04-01 16:18:07 +0000
commit5e9fb3dbde748212ff0b025dcf196da9b086b1c4 (patch)
tree678ba6a902249fc47cbebb2dbc758ecac5476c69 /gcc/tree-ssa-loop-ivopts.c
parenteb258d7f5d615232494c75db7e6dfab151a7b7d0 (diff)
downloadgcc-5e9fb3dbde748212ff0b025dcf196da9b086b1c4.zip
gcc-5e9fb3dbde748212ff0b025dcf196da9b086b1c4.tar.gz
gcc-5e9fb3dbde748212ff0b025dcf196da9b086b1c4.tar.bz2
re PR tree-optimization/43614 (ice in gimple_rhs_has_side_effects, at gimple.c:2248)
2010-04-01 Richard Guenther <rguenther@suse.de> PR middle-end/43614 * tree-ssa-address.c (copy_mem_ref_info): Copy TREE_SIDE_EFFECTS and TREE_THIS_VOLATILE. (copy_ref_info): Likewise. * tree-ssa-operands.c (get_tmr_operands): Check TREE_THIS_VOLATILE. * tree.c (build6_stat): Ignore side-effects of all but arg5 for TARGET_MEM_REF. Set TREE_THIS_VOLATILE from arg5 of TARGET_MEM_REF. * gcc.c-torture/compile/pr43614.c: New testcase. From-SVN: r157913
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.c')
-rw-r--r--gcc/tree-ssa-loop-ivopts.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index e6565db..f6db241 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -5517,7 +5517,11 @@ copy_ref_info (tree new_ref, tree old_ref)
if (TREE_CODE (old_ref) == TARGET_MEM_REF)
copy_mem_ref_info (new_ref, old_ref);
else
- TMR_ORIGINAL (new_ref) = unshare_and_remove_ssa_names (old_ref);
+ {
+ TMR_ORIGINAL (new_ref) = unshare_and_remove_ssa_names (old_ref);
+ TREE_SIDE_EFFECTS (new_ref) = TREE_SIDE_EFFECTS (old_ref);
+ TREE_THIS_VOLATILE (new_ref) = TREE_THIS_VOLATILE (old_ref);
+ }
}
/* Rewrites USE (address that is an iv) using candidate CAND. */