summaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-10-31 06:45:45 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-10-31 06:45:45 +0000
commitfdbc1bed84d111b1ddd8e2771f92e16b8e00ce82 (patch)
tree6bc54f26c24db4e3651f5d6454899230fbbd9281 /gcc/expr.c
parenta43e402dc0c91dae3fa15dae9a594cf695a580b6 (diff)
downloadgcc-fdbc1bed84d111b1ddd8e2771f92e16b8e00ce82.tar.gz
2008-10-31 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r141467 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@141491 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 11902b832b2..6db637e53bf 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);
}
}