(push_init_level): When aligning next struct field,
authorRichard Stallman <rms@gnu.org>
Tue, 16 Nov 1993 13:40:41 +0000 (13:40 +0000)
committerRichard Stallman <rms@gnu.org>
Tue, 16 Nov 1993 13:40:41 +0000 (13:40 +0000)
make sure there's another field left.

From-SVN: r6110

gcc/c-typeck.c

index 1b5fa4f00ade9e53181b9cca913e6062bbc337c4..650d754464dbf2296b8cfee5f6c39eb5ef6af903 100644 (file)
@@ -5042,7 +5042,8 @@ push_init_level (implicit)
 
   /* Structure elements may require alignment.  Do this now
      if necessary for the subaggregate.  */
-  if (constructor_incremental && TREE_CODE (constructor_type) == RECORD_TYPE)
+  if (constructor_incremental && TREE_CODE (constructor_type) == RECORD_TYPE
+      && constructor_fields)
     {
       /* Advance to offset of this element.  */
       if (! tree_int_cst_equal (constructor_bit_index,