]> gcc.gnu.org Git - gcc.git/commitdiff
expr.c (store_constructor): Restore sanity check on the size of the type before clearing.
authorOlivier Hainque <hainque@act-europe.fr>
Thu, 27 May 2004 19:28:51 +0000 (21:28 +0200)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 27 May 2004 19:28:51 +0000 (19:28 +0000)
* expr.c (store_constructor): Restore sanity check on
the size of the type before clearing.

From-SVN: r82335

gcc/ChangeLog
gcc/expr.c

index 6691fabb8ac47b079f97247320ddc32b100dfaaf..9f39261febc86eb8b59ac0bc0de56cff76075552 100644 (file)
@@ -1,3 +1,8 @@
+2004-05-27  Olivier Hainque  <hainque@act-europe.fr>
+
+       * expr.c (store_constructor): Restore sanity check on
+       the size of the type before clearing.
+
 2004-05-27  Jan Hubicka  <jh@suse.cz>
 
        * cfgbuild.c (control_flow_insn_p):  Notice noreturn call
index dd0725811edd4931ba952c9fad27d206ec9d7db5..5aa3efaa23da3ac834c312fdc75d37033be9f84c 100644 (file)
@@ -4673,8 +4673,9 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
         clear the whole structure first.  Don't do this if TARGET is a
         register whose mode size isn't equal to SIZE since clear_storage
         can't handle this case.  */
-      else if (((list_length (CONSTRUCTOR_ELTS (exp)) != fields_length (type))
-               || mostly_zeros_p (exp))
+      else if (size > 0
+              && ((list_length (CONSTRUCTOR_ELTS (exp)) != fields_length (type))
+                  || mostly_zeros_p (exp))
               && (GET_CODE (target) != REG
                   || ((HOST_WIDE_INT) GET_MODE_SIZE (GET_MODE (target))
                       == size)))
This page took 0.088994 seconds and 5 git commands to generate.