A testcase to trigger the assert was:
typedef _Bool Tal16bool __attribute__ ((aligned (16)));
struct S49
{
Tal16bool a:1;
};
and it turns out that the underlying problem is actually in the
general-purpose
field layout code. Both known_align and actual_align are calculated as
BIGGEST_ALIGNMENT if
Danny Smith wrote:
Jim Wilson wrote http://gcc.gnu.org/ml/gcc/2005-04/msg01172.html
Joern RENNECKE wrote:
required for Tal16bool. Should we enforce that any storage element
allocated
for a run of ms-bitfields get the full alignment of the basetype,
even when it exceeds
Joern RENNECKE wrote:
required for Tal16bool. Should we enforce that any storage element
allocated
for a run of ms-bitfields get the full alignment of the basetype, even
when it exceeds
the size of the basetype and of BIGGEST_ALIGNMENT?
Obviously, we should do the exact same thing that the micro
t001_x of the struct-layout test has such beauties as:
typedef _Bool Tal16bool __attribute__((aligned (16)));
struct S49 { Tal16bool a:1; } ;
. a only gets BIGGEST_ALIGNMENT (i.e. 64 bits), rather than the 128 bits
required for Tal16bool. Should we enforce that any storage element
allocated
for