summaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2002-02-16 18:44:14 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2002-02-16 13:44:14 -0500
commit725e58b1b6b9e59bfb05d08572210ae1050fe232 (patch)
treec71c53ccc676e9349b0b92e81be55ef57bf72b72 /gcc/expr.c
parent7f311f637fb7a5aaf375d78c7f585bc4c43665dc (diff)
downloadgcc-725e58b1b6b9e59bfb05d08572210ae1050fe232.tar.gz
* expr.c (store_constructor): Handle target REG case for ARRAY_TYPE.
From-SVN: r49805
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index fe874ce648e..73690372e4e 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -4617,7 +4617,12 @@ store_constructor (exp, target, cleared, size)
if (need_to_clear && size > 0)
{
if (! cleared)
- clear_storage (target, GEN_INT (size));
+ {
+ if (REG_P (target))
+ emit_move_insn (target, CONST0_RTX (GET_MODE (target)));
+ else
+ clear_storage (target, GEN_INT (size));
+ }
cleared = 1;
}
else if (REG_P (target))