stor-layout.c (layout_decl): Turn bitfields into ordinary fields...

* stor-layout.c (layout_decl): Turn bitfields into ordinary
	fields, even if they are the first field in a structure.

From-SVN: r75242
This commit is contained in:
Mark Mitchell 2003-12-30 19:49:59 +00:00 committed by Mark Mitchell
parent b6d904612e
commit 9a706ec713
2 changed files with 8 additions and 1 deletions

View 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

View 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));