darwin-ppc gets the alignment of nested structs wrong if they contain long long or double members. The apple compiler, gcc version 4.0.1 (Apple Computer, Inc. build 5247) does it 'correctly'. Here an example for a wrong alignment: struct A {long long a; unsigned char b;}; struct D {unsigned char y; struct A x; unsigned char z;}; struct E {long long d; unsigned char e;}; struct y { struct A b2; struct D b3; struct E b4;}; The apple output of sizeof(y) is 56, the current fsf gcc head gives: 64. I put a few sample test cases into gcc.target/powerpc/darwin-abi-3...11.c on main.
Confirmed.
I think this is a dup of bug 23067; they have the same underlying problem, which is that FSF GCC doesn't emulate the Apple GCC algorithm for structure layout exactly. *** This bug has been marked as a duplicate of 23067 ***