+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
HOST_WIDE_INT bitpos;
rtvec vector = NULL;
unsigned n_elts;
+ alias_set_type alias;
gcc_assert (eltmode != BLKmode);
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;
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;
bitpos = eltpos * elt_size;
store_constructor_field (target, bitsize, bitpos,
value_mode, value, type,
- cleared, get_alias_set (elttype));
+ cleared, alias);
}
}
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.
--- /dev/null
+/* 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" } } */