From 723a7cedae9574c8158bcf9e0c563ebb72a6e28c Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 30 Oct 2008 13:49:31 +0100 Subject: re PR middle-end/37730 (gcc.c-torture/compile/pr37713.c ICEs at -O3 -msse2) PR middle-end/37730 * expr.c (store_constructor): For vectors, if target is a MEM, use target's MEM_ALIAS_SET instead of elttype alias set. * gcc.dg/vect/pr37730.c: New test. From-SVN: r141461 --- gcc/expr.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gcc/expr.c') diff --git a/gcc/expr.c b/gcc/expr.c index 11902b83..6db637e 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -5579,6 +5579,7 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size) HOST_WIDE_INT bitpos; rtvec vector = NULL; unsigned n_elts; + alias_set_type alias; gcc_assert (eltmode != BLKmode); @@ -5630,7 +5631,7 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size) if (need_to_clear && size > 0 && !vector) { if (REG_P (target)) - emit_move_insn (target, CONST0_RTX (GET_MODE (target))); + emit_move_insn (target, CONST0_RTX (GET_MODE (target))); else clear_storage (target, GEN_INT (size), BLOCK_OP_NORMAL); cleared = 1; @@ -5640,6 +5641,11 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size) if (!cleared && !vector && REG_P (target)) emit_move_insn (target, CONST0_RTX (GET_MODE (target))); + if (MEM_P (target)) + alias = MEM_ALIAS_SET (target); + else + alias = get_alias_set (elttype); + /* Store each element of the constructor into the corresponding element of TARGET, determined by counting the elements. */ for (idx = 0, i = 0; @@ -5675,7 +5681,7 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size) bitpos = eltpos * elt_size; store_constructor_field (target, bitsize, bitpos, value_mode, value, type, - cleared, get_alias_set (elttype)); + cleared, alias); } } -- cgit v1.1