Off-by-ones in layout_decl
Richard Kenner
kenner@vlsi1.ultra.nyu.edu
Fri Apr 14 04:58:00 GMT 2000
Fri Apr 14 07:40:32 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* stor-layout.c (layout_decl): Properly compare KNOWN_ALIGN to
see if DECL_BIT_FIELD needs to still be set.
*** stor-layout.c 2000/04/03 06:17:03 1.65
--- stor-layout.c 2000/04/14 11:26:23
*************** layout_decl (decl, known_align)
*** 352,356 ****
= mode_for_size_tree (DECL_SIZE (decl), MODE_INT, 1);
! if (xmode != BLKmode && known_align > GET_MODE_ALIGNMENT (xmode))
{
DECL_ALIGN (decl) = MAX (GET_MODE_ALIGNMENT (xmode),
--- 352,356 ----
= mode_for_size_tree (DECL_SIZE (decl), MODE_INT, 1);
! if (xmode != BLKmode && known_align >= GET_MODE_ALIGNMENT (xmode))
{
DECL_ALIGN (decl) = MAX (GET_MODE_ALIGNMENT (xmode),
*************** layout_decl (decl, known_align)
*** 364,368 ****
if (code == FIELD_DECL && DECL_BIT_FIELD (decl)
&& TYPE_MODE (type) == BLKmode && DECL_MODE (decl) == BLKmode
! && known_align > TYPE_ALIGN (type)
&& DECL_ALIGN (decl) >= TYPE_ALIGN (type)
&& DECL_SIZE_UNIT (decl) != 0)
--- 364,368 ----
if (code == FIELD_DECL && DECL_BIT_FIELD (decl)
&& TYPE_MODE (type) == BLKmode && DECL_MODE (decl) == BLKmode
! && known_align >= TYPE_ALIGN (type)
&& DECL_ALIGN (decl) >= TYPE_ALIGN (type)
&& DECL_SIZE_UNIT (decl) != 0)
More information about the Gcc-patches
mailing list