This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/25630] New: darwin-ppc, wrong alignment of nested structs
- From: "andreast at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Jan 2006 20:35:17 -0000
- Subject: [Bug target/25630] New: darwin-ppc, wrong alignment of nested structs
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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.
--
Summary: darwin-ppc, wrong alignment of nested structs
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: andreast at gcc dot gnu dot org
GCC build triplet: powerpc-apple-darwin8.3.0
GCC host triplet: powerpc-apple-darwin8.3.0
GCC target triplet: powerpc-apple-darwin8.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25630