* stor-layout.c (layout_decl): Don't abort on any zero sized decl.
authorRichard Henderson <rth@cygnus.com>
Sun, 19 Mar 2000 11:56:54 +0000 (03:56 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Sun, 19 Mar 2000 11:56:54 +0000 (03:56 -0800)
From-SVN: r32638

gcc/ChangeLog
gcc/stor-layout.c

index 864d4b5555f159612740f4ff0674007493d66391..222701aadd8fc267c35a26d1056f10feb33e2d09 100644 (file)
@@ -7,6 +7,8 @@
        * fold-const.c (extract_muldiv): Apply type check for defined
        overflow to multiply as well as divide.
 
+       * stor-layout.c (layout_decl): Don't abort on any zero sized decl.
+
 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
 
        * emit-rtl.c (remove_unncessary_notes): Check that all
index 62363cbbde0bcf5c8bf4ae3274c4f9b73152582f..690ec365ea4719eaf26e9b3e4646d60fe51da159 100644 (file)
@@ -308,17 +308,6 @@ layout_decl (decl, known_align)
     {
       HOST_WIDE_INT spec_size;
 
-      /* The front-end may set the explicit width of the field, so its
-        size may not be the same as the size of its type.  This happens
-        with bitfields, of course (an `int' bitfield may be only 2 bits,
-        say), but it also happens with other fields.  For example, the
-        C++ front-end creates zero-sized fields corresponding to empty
-        base classes, and depends on layout_type setting
-        DECL_FIELD_BITPOS correctly for the field.  */
-      if (integer_zerop (DECL_SIZE (decl)) 
-         && DECL_NAME (decl) != NULL_TREE)
-       abort ();
-
       /* Size is specified in number of bits.  */
       spec_size = TREE_INT_CST_LOW (DECL_SIZE (decl));
       if (spec_size % BITS_PER_UNIT == 0)