http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670
Bug ID: 60670 Summary: omp.h may differ between multilibs Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgomp Assignee: unassigned at gcc dot gnu.org Reporter: ro at gcc dot gnu.org CC: jakub at gcc dot gnu.org Host: *-*-solaris2.*, x86_64-unknown-linux-gnu Target: *-*-solaris2.*, x86_64-unknown-linux-gnu Build: *-*-solaris2.*, x86_64-unknown-linux-gnu It has been noticed that the libgomp omp.h header that is generated at build time may differ between different multilibs. E.g. * i386-pc-solaris2.11: --- omp.h 2014-03-21 14:27:34.522529041 +0100 +++ ../amd64/libgomp/omp.h 2014-03-21 14:27:56.903263206 +0100 @@ -34,13 +34,13 @@ typedef struct { unsigned char _x[48] - __attribute__((__aligned__(4))); + __attribute__((__aligned__(8))); } omp_lock_t; typedef struct { - unsigned char _x[56] - __attribute__((__aligned__(4))); + unsigned char _x[64] + __attribute__((__aligned__(8))); } omp_nest_lock_t; #endif * sparc-sun-solaris2.11: --- omp.h 2014-03-21 15:26:13.738263000 +0100 +++ ../sparcv9/libgomp/omp.h 2014-03-21 15:26:49.743545700 +0100 @@ -39,7 +39,7 @@ typedef struct { - unsigned char _x[56] + unsigned char _x[64] __attribute__((__aligned__(8))); } omp_nest_lock_t; #endif * x86_64-unknown-linux-gnu: --- omp.h 2014-03-21 19:02:19.351059178 +0100 +++ ../32/libgomp/omp.h 2014-03-21 19:02:30.432588699 +0100 @@ -39,8 +39,8 @@ typedef struct { - unsigned char _x[16] - __attribute__((__aligned__(8))); + unsigned char _x[12] + __attribute__((__aligned__(4))); } omp_nest_lock_t; #endif Unfortunately, only the version for the default multilib is installed. Given that variables of those types can be allocated by user code and size and/or alignment can differ between different multilibs, this can lead to all sorts of errors when the allocations performed are smaller than what libgomp assumes. It seems like different per-multilib headers need to be installed into separate hierarchies to handle this. Rainer