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
This commit is contained in:
parent
8ec6daa568
commit
723a7cedae
4 changed files with 33 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2008-10-30 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
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.
|
||||
|
||||
2008-10-29 Kaz Kojima <kkojima@gcc.gnu.org>
|
||||
|
||||
PR target/37909
|
||||
|
|
10
gcc/expr.c
10
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
2008-10-30 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/37730
|
||||
* gcc.dg/vect/pr37730.c: New test.
|
||||
|
||||
PR debug/36668
|
||||
* g++.dg/other/PR23205.C: Allow foobar to be defined as variable.
|
||||
* g++.dg/other/pr23205-2.C: New test.
|
||||
|
|
16
gcc/testsuite/gcc.dg/vect/pr37730.c
Normal file
16
gcc/testsuite/gcc.dg/vect/pr37730.c
Normal file
|
@ -0,0 +1,16 @@
|
|||
/* PR middle-end/37730 */
|
||||
/* { dg-do compile } */
|
||||
|
||||
void
|
||||
add_opush (void)
|
||||
{
|
||||
unsigned char formats[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0xff };
|
||||
void *dtds[sizeof (formats)];
|
||||
unsigned int i;
|
||||
unsigned char dtd = 0x08;
|
||||
for (i = 0; i < sizeof (formats); i++)
|
||||
dtds[i] = &dtd;
|
||||
sdp_seq_alloc (dtds);
|
||||
}
|
||||
|
||||
/* { dg-final { cleanup-tree-dump "vect" } } */
|
Loading…
Add table
Reference in a new issue