diff options
author | Richard Guenther <rguenther@suse.de> | 2010-04-01 16:18:07 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-04-01 16:18:07 +0000 |
commit | 5e9fb3dbde748212ff0b025dcf196da9b086b1c4 (patch) | |
tree | 678ba6a902249fc47cbebb2dbc758ecac5476c69 /gcc/tree.c | |
parent | eb258d7f5d615232494c75db7e6dfab151a7b7d0 (diff) | |
download | gcc-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.c')
-rw-r--r-- | gcc/tree.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -3824,10 +3824,14 @@ build6_stat (enum tree_code code, tree tt, tree arg0, tree arg1, PROCESS_ARG(2); PROCESS_ARG(3); PROCESS_ARG(4); + if (code == TARGET_MEM_REF) + side_effects = 0; PROCESS_ARG(5); TREE_SIDE_EFFECTS (t) = side_effects; - TREE_THIS_VOLATILE (t) = 0; + TREE_THIS_VOLATILE (t) + = (code == TARGET_MEM_REF + && arg5 && TREE_THIS_VOLATILE (arg5)); return t; } |