public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgomp/60670] New: omp.h may differ between multilibs
@ 2014-03-26 14:23 ro at gcc dot gnu.org
  2014-03-28  9:24 ` [Bug libgomp/60670] " rguenth at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: ro at gcc dot gnu.org @ 2014-03-26 14:23 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-06-26 21:20 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-26 14:23 [Bug libgomp/60670] New: omp.h may differ between multilibs ro at gcc dot gnu.org
2014-03-28  9:24 ` [Bug libgomp/60670] " rguenth at gcc dot gnu.org
2014-03-28  9:27 ` ro at CeBiTec dot Uni-Bielefeld.DE
2014-04-04 14:32 ` ro at gcc dot gnu.org
2014-04-04 15:16 ` burnus at gcc dot gnu.org
2014-04-04 15:20 ` ro at CeBiTec dot Uni-Bielefeld.DE
2014-04-22 11:38 ` jakub at gcc dot gnu.org
2014-06-12 19:13 ` jacknagel at gmail dot com
2014-07-16 13:30 ` jakub at gcc dot gnu.org
2014-10-30 10:41 ` jakub at gcc dot gnu.org
2015-02-10 19:10 ` pinskia at gcc dot gnu.org
2015-06-26 20:01 ` jakub at gcc dot gnu.org
2015-06-26 20:31 ` jakub at gcc dot gnu.org
2015-06-26 21:21 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).