From: Richard Stallman Date: Mon, 5 Apr 1993 10:55:34 +0000 (+0000) Subject: (store_constructor): Properly compute size of array when X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=597bb7f10b5819fa4209fb5d981f5d660661fb00;p=gcc.git (store_constructor): Properly compute size of array when clearing the whole array. From-SVN: r4021 --- 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));