aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorAndrew Pinski <andrew_pinski@playstation.sony.com>2007-06-12 19:15:50 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2007-06-12 12:15:50 -0700
commit4543943ad4323c336993836933f7011c295fd50f (patch)
treec9750b4c2fab79d638858ba8919c1d37430242a4 /gcc/expr.c
parent4c8c70e06a66649496afd6fed8ffa3c131c8de82 (diff)
downloadgcc-4543943ad4323c336993836933f7011c295fd50f.zip
gcc-4543943ad4323c336993836933f7011c295fd50f.tar.gz
gcc-4543943ad4323c336993836933f7011c295fd50f.tar.bz2
re PR middle-end/31579 (ICE when compiling attached code)
2007-06-12 Andrew Pinski <andrew_pinski@playstation.sony.com> PR middle-end/31579 * expr.c (expand_expr_addr_expr_1): Call expand_expr for the offset with the modifier as EXPAND_INITIALIZER if the modifier is EXPAND_INITIALIZER. (expand_expr_real_1 <case INTEGER_CST>): Don't force to a register if we had an overflow. 2007-06-12 Andrew Pinski <andrew_pinski@playstation.sony.com> PR middle-end/31579 * g++.dg/torture/pr31579.C: New testcase. From-SVN: r125655
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 2a4629a..9c91c4e 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -6695,7 +6695,9 @@ expand_expr_addr_expr_1 (tree exp, rtx target, enum machine_mode tmode,
if (modifier != EXPAND_NORMAL)
result = force_operand (result, NULL);
- tmp = expand_expr (offset, NULL_RTX, tmode, EXPAND_NORMAL);
+ tmp = expand_expr (offset, NULL_RTX, tmode,
+ modifier == EXPAND_INITIALIZER
+ ? EXPAND_INITIALIZER : EXPAND_NORMAL);
result = convert_memory_address (tmode, result);
tmp = convert_memory_address (tmode, tmp);
@@ -7118,15 +7120,6 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
temp = immed_double_const (TREE_INT_CST_LOW (exp),
TREE_INT_CST_HIGH (exp), mode);
- /* ??? If overflow is set, fold will have done an incomplete job,
- which can result in (plus xx (const_int 0)), which can get
- simplified by validate_replace_rtx during virtual register
- instantiation, which can result in unrecognizable insns.
- Avoid this by forcing all overflows into registers. */
- if (TREE_OVERFLOW (exp)
- && modifier != EXPAND_INITIALIZER)
- temp = force_reg (mode, temp);
-
return temp;
case VECTOR_CST: