public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgomp/29308] New: TLS / non-TLS mismatch for COMMON declared in both ways
@ 2006-10-01 14:47 rep dot nop at aon dot at
2006-10-01 18:16 ` [Bug fortran/29308] " jakub at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: rep dot nop at aon dot at @ 2006-10-01 14:47 UTC (permalink / raw)
To: gcc-bugs
Compiling CAMx_v4.20, i'm getting:
/usr/bin/ld: equk_: TLS reference in ./CF_AERO/isocom_v1.6.o mismatches non-TLS
reference in ./CMU_AERO/diffund.o
./CMU_AERO/diffund.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [model] Error 1
make[1]: Leaving directory `/home/cow/src/CAMX/CAMx_Bench/CAMx_v4.20/src'
make: *** [gfortran_linuxomp] Error 2
The error stems from a common that is used $omp threadprivate in one file and
without annotation in another file (which may be an application glitch but
ifort deals with this nicely):
$ cat inc1.inc
COMMON /EQUK/ XK1
c$omp threadprivate(/EQUK/)
$ cat inc2.inc
COMMON /EQUK/ XK1
$ cat sub1.f
SUBROUTINE sub1
INCLUDE 'inc1.inc'
END SUBROUTINE sub1
$ cat sub2.f
SUBROUTINE sub2
INCLUDE 'inc2.inc'
END SUBROUTINE sub2
$ cat main.f
call sub1
call sub2
END
$ cat Makefile
all: sub1.o sub2.o main.o
$(FC) $^
$ make FC=gfortran-4.2.orig-HEAD FFLAGS=-fopenmp
gfortran-4.2.orig-HEAD -fopenmp -c -o sub1.o sub1.f
gfortran-4.2.orig-HEAD -fopenmp -c -o sub2.o sub2.f
gfortran-4.2.orig-HEAD -fopenmp -c -o main.o main.f
gfortran-4.2.orig-HEAD sub1.o sub2.o main.o
/usr/bin/ld: equk_: TLS reference in sub1.o mismatches non-TLS reference in
sub2.o
sub2.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [all] Error 1
$ gfortran-4.2.orig-HEAD -v
Using built-in specs.
Target: i686-linux-gnu
Configured with: ../../src/gcc-4.2.orig/configure -v
--enable-languages=c,c++,fortran,treelang --prefix=/opt/gcc-4.2.orig/
--enable-shared --with-system-zlib --libexecdir=/opt/gcc-4.2.orig/lib
--enable-nls --without-included-gettext --enable-threads=posix
--program-suffix=-4.2.orig-HEAD --enable-__cxa_atexit
--enable-libstdcxx-allocator=mt --enable-clocale=gnu --disable-libstdcxx-debug
--enable-mpfr --disable-werror --enable-checking=release --enable-debug
i686-linux-gnu
Thread model: posix
gcc version 4.2.0 20060930 (experimental)
--
Summary: TLS / non-TLS mismatch for COMMON declared in both ways
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgomp
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rep dot nop at aon dot at
GCC build triplet: i686-linux-gnu
GCC host triplet: i686-linux-gnu
GCC target triplet: i686-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29308
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug fortran/29308] TLS / non-TLS mismatch for COMMON declared in both ways
2006-10-01 14:47 [Bug libgomp/29308] New: TLS / non-TLS mismatch for COMMON declared in both ways rep dot nop at aon dot at
@ 2006-10-01 18:16 ` jakub at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-10-01 18:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jakub at gcc dot gnu dot org 2006-10-01 18:16 -------
That testcase is invalid.
See OpenMP 2.5 standard, 2.8.2, which states:
If a threadprivate directive specifying a common block name appears in one
program unit, then such a directive must also appear in every other program
unit that contains a COMMON statement specifying the same name.
I don't see a big advantage in silently accepting invalid code.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29308
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-10-01 18:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-01 14:47 [Bug libgomp/29308] New: TLS / non-TLS mismatch for COMMON declared in both ways rep dot nop at aon dot at
2006-10-01 18:16 ` [Bug fortran/29308] " jakub at gcc dot gnu dot 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).