summaryrefslogtreecommitdiffstats
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1993-04-05 10:55:34 +0000
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1993-04-05 10:55:34 +0000
commit96c6fac04a566b14350d11615ba8c05acfd3b2f4 (patch)
tree6f42deec65d5ed116fe3fa64e651113d9b90801c /gcc/expr.c
parentc3b257dd7cb863172a18336ee361400eb1add22f (diff)
downloadppe42-gcc-96c6fac04a566b14350d11615ba8c05acfd3b2f4.tar.gz
ppe42-gcc-96c6fac04a566b14350d11615ba8c05acfd3b2f4.zip
(store_constructor): Properly compute size of array when
clearing the whole array. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4021 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 3d0bc0e7168..eadf2e3b9f5 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -2565,7 +2565,7 @@ store_constructor (exp, target)
if (list_length (CONSTRUCTOR_ELTS (exp)) < maxelt - minelt + 1
|| (GET_CODE (target) == REG && TREE_STATIC (exp)))
- clear_storage (target, maxelt - minelt + 1);
+ clear_storage (target, int_size_in_bytes (type));
else
/* Inform later passes that the old value is dead. */
emit_insn (gen_rtx (CLOBBER, VOIDmode, target));
OpenPOWER on IntegriCloud