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

* [Bug libgomp/60670] omp.h may differ between multilibs
  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 ` rguenth at gcc dot gnu.org
  2014-03-28  9:27 ` ro at CeBiTec dot Uni-Bielefeld.DE
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-03-28  9:24 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Or the header needs to include all variants with proper #ifdef-ery


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

* [Bug libgomp/60670] omp.h may differ between multilibs
  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
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2014-03-28  9:27 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670

--- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
> Or the header needs to include all variants with proper #ifdef-ery

This is difficult for a header generated per multilib at build time.

    Rainer


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

* [Bug libgomp/60670] omp.h may differ between multilibs
  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
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: ro at gcc dot gnu.org @ 2014-04-04 14:32 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.9.0


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

* [Bug libgomp/60670] omp.h may differ between multilibs
  2014-03-26 14:23 [Bug libgomp/60670] New: omp.h may differ between multilibs ro at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  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
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: burnus at gcc dot gnu.org @ 2014-04-04 15:16 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to ro@CeBiTec.Uni-Bielefeld.DE from comment #2)
> > --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
> > Or the header needs to include all variants with proper #ifdef-ery
> 
> This is difficult for a header generated per multilib at build time.

A similar issue potentially arises for OpenMP's Fortran libraries under
finclude/, i.e. omp_lib.h, omp_lib.f90, omp_lib.mod, omp_lib_kinds.mod.

Recall that the module files (.mod) are not preprocessed - and the .h files are
not if one uses "include 'omp_lib'" (instead of "#include")

However, I think for currently used type there should be no problem (with
all/most targets).


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

* [Bug libgomp/60670] omp.h may differ between multilibs
  2014-03-26 14:23 [Bug libgomp/60670] New: omp.h may differ between multilibs ro at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  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
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2014-04-04 15:20 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670

--- Comment #4 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
> (In reply to ro@CeBiTec.Uni-Bielefeld.DE from comment #2)
>> > --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
>> > Or the header needs to include all variants with proper #ifdef-ery
>> 
>> This is difficult for a header generated per multilib at build time.
>
> A similar issue potentially arises for OpenMP's Fortran libraries under
> finclude/, i.e. omp_lib.h, omp_lib.f90, omp_lib.mod, omp_lib_kinds.mod.
>
> Recall that the module files (.mod) are not preprocessed - and the .h files are
> not if one uses "include 'omp_lib'" (instead of "#include")
>
> However, I think for currently used type there should be no problem (with
> all/most targets).

Right, at least on Solaris/SPARC and x86 the 32-bit and 64-bit
omp_lib.{h,mod} are identical.

    Rainer


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

* [Bug libgomp/60670] omp.h may differ between multilibs
  2014-03-26 14:23 [Bug libgomp/60670] New: omp.h may differ between multilibs ro at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  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
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-04-22 11:38 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.9.0                       |4.9.1

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.9.0 has been released


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

* [Bug libgomp/60670] omp.h may differ between multilibs
  2014-03-26 14:23 [Bug libgomp/60670] New: omp.h may differ between multilibs ro at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  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
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jacknagel at gmail dot com @ 2014-06-12 19:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670

jacknagel at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jacknagel at gmail dot com

--- Comment #6 from jacknagel at gmail dot com ---
This also happens on Darwin (i386/x86_64 multilib).


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

* [Bug libgomp/60670] omp.h may differ between multilibs
  2014-03-26 14:23 [Bug libgomp/60670] New: omp.h may differ between multilibs ro at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  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
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-07-16 13:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.9.1                       |4.9.2

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.9.1 has been released.


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

* [Bug libgomp/60670] omp.h may differ between multilibs
  2014-03-26 14:23 [Bug libgomp/60670] New: omp.h may differ between multilibs ro at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  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
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-10-30 10:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.9.2                       |4.9.3

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.9.2 has been released.


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

* [Bug libgomp/60670] omp.h may differ between multilibs
  2014-03-26 14:23 [Bug libgomp/60670] New: omp.h may differ between multilibs ro at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-02-10 19:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-02-10
     Ever confirmed|0                           |1

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Or better yet change @OMP_LOCK_SIZE@ and @OMP_LOCK_ALIGN@ from being a
configured generated to one which is done in a header file.  See how libffi
handles this.

Confirmed.


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

* [Bug libgomp/60670] omp.h may differ between multilibs
  2014-03-26 14:23 [Bug libgomp/60670] New: omp.h may differ between multilibs ro at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  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
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-26 20:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.9.3 has been released.


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

* [Bug libgomp/60670] omp.h may differ between multilibs
  2014-03-26 14:23 [Bug libgomp/60670] New: omp.h may differ between multilibs ro at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  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
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-26 20:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.9.3                       |4.9.4


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

* [Bug libgomp/60670] omp.h may differ between multilibs
  2014-03-26 14:23 [Bug libgomp/60670] New: omp.h may differ between multilibs ro at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2015-06-26 20:31 ` jakub at gcc dot gnu.org
@ 2015-06-26 21:21 ` pinskia at gcc dot gnu.org
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-06-26 21:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.9.4                       |---


^ 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).