Commit 73f07942 by Jason Merrill

re PR c/11446 ([3.4][3.4 regression?] Incompatibilty with alignment of…

re PR c/11446 ([3.4][3.4 regression?] Incompatibilty with alignment of structures between 3.3 and 3.4 CVS)

        PR c/11446
        * stor-layout.c (layout_decl): Fix alignment handling.

From-SVN: r72725
parent 2038bd69
/* PR c/11446: packed on a struct takes precedence over aligned on the type
of a field. */
/* { dg-do run } */
struct A {
double d;
} __attribute__ ((aligned));
struct B {
char c;
struct A a;
} __attribute__ ((packed));
int main ()
{
if (sizeof (struct B) != sizeof (char) + sizeof (struct A))
abort ();
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment