summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivopts.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-01 16:18:07 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-01 16:18:07 +0000
commit9c44b3951ca82eceb9be44f16a23fbd8c30240f4 (patch)
tree678ba6a902249fc47cbebb2dbc758ecac5476c69 /gcc/tree-ssa-loop-ivopts.c
parent0369b84fd8955b232eab4d48e2f9f0d27c6b3636 (diff)
downloadgcc-9c44b3951ca82eceb9be44f16a23fbd8c30240f4.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157913 138bc75d-0d04-0410-961f-82ee72b054a4
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 e6565dbdf99..f6db2415a36 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. */