[Bug target/52991] [6/7/8 Regression] attribute packed broken on mingw32?
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 28 17:25:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52991
--- Comment #32 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Feb 28 17:17:29 2018
New Revision: 258075
URL: https://gcc.gnu.org/viewcvs?rev=258075&root=gcc&view=rev
Log:
PR target/52991
* stor-layout.c (update_alignment_for_field): For
targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
&& !DECL_PACKED (field), do the alignment update, just use
only desired_align instead of MAX (type_align, desired_align)
as the alignment.
(place_field): Don't do known_align < desired_align handling
early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
is non-NULL, instead do it after rli->prev_field handling and
only if not within a bitfield word. For DECL_PACKED (field)
use type_align of BITS_PER_UNIT.
* gcc.dg/bf-ms-layout.c: Revert 2012-04-26 changes.
* gcc.dg/bf-ms-layout-2.c: Revert 2012-02-23 changes.
* gcc.dg/bf-ms-layout-4.c: New test.
* gcc.dg/bf-ms-layout-5.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/bf-ms-layout-4.c
trunk/gcc/testsuite/gcc.dg/bf-ms-layout-5.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/stor-layout.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/bf-ms-layout-2.c
trunk/gcc/testsuite/gcc.dg/bf-ms-layout.c
More information about the Gcc-bugs
mailing list