]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
stor-layout.c (layout_decl): Turn bitfields into ordinary fields...
authorMark Mitchell <mark@codesourcery.com>
Tue, 30 Dec 2003 19:49:59 +0000 (19:49 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Tue, 30 Dec 2003 19:49:59 +0000 (19:49 +0000)
* stor-layout.c (layout_decl): Turn bitfields into ordinary
fields, even if they are the first field in a structure.

From-SVN: r75242

gcc/ChangeLog
gcc/stor-layout.c

index 20ca93eba17b02c7789d686202a12beb588b3baf..b84f4cfd38b1da0dac2351060a4ef343b45ef40d 100644 (file)
@@ -1,3 +1,8 @@
+2003-12-30  Mark Mitchell  <mark@codesourcery.com>
+
+       * stor-layout.c (layout_decl): Turn bitfields into ordinary
+       fields, even if they are the first field in a structure.
+
 2003-12-30  Roger Sayle  <roger@eyesopen.com>
 
        * fold-const.c (fold) <COND_EXPR>: Don't require strict type
index e8c7ba4dc9abe2d3bc31c14710668791f6bc1771..1272a0cbbccf3dbe3de5e07c6a5abafeb1a2a996 100644 (file)
@@ -435,7 +435,9 @@ layout_decl (tree decl, unsigned int known_align)
              enum machine_mode xmode
                = mode_for_size_tree (DECL_SIZE (decl), MODE_INT, 1);
 
-             if (xmode != BLKmode && known_align >= GET_MODE_ALIGNMENT (xmode))
+             if (xmode != BLKmode 
+                 && (known_align == 0
+                     || known_align >= GET_MODE_ALIGNMENT (xmode)))
                {
                  DECL_ALIGN (decl) = MAX (GET_MODE_ALIGNMENT (xmode),
                                           DECL_ALIGN (decl));