This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: RFC libgomp/testsuite/libgomp.fortran
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: rittle at labs dot mot dot com
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org, sje at cup dot hp dot com
- Date: Wed, 2 Sep 2009 16:18:17 -0700
- Subject: Re: PATCH: RFC libgomp/testsuite/libgomp.fortran
- References: <200909022231.n82MVGZZ040047@latour.labs.mot.com>
On Wed, Sep 02, 2009 at 05:31:16PM -0500, Loren James Rittle wrote:
> (CCing fortran mailing list since perhaps related to libgomp.fortran.)
> (CCing Steve and John since their Aug. reports also display this problem.)
>
> Inside gcc mainline, I noticed that various tests in
> libgomp/testsuite/libgomp.fortran pass on i386-*-freebsd7 when
> -pthread was globally applied (i.e. as by setting RUNTESTFLAGS) but
> fail when run with defaults due to missing pthread_create symbol.
>
> Each failing test has: { dg-options "-fno-openmp" }
>
> Since I don't see this in reports for many other ports, I ponder: Is
> this particular port slightly misconfigured somewhere? Is the test
> code configuration for this port missing something?
>
> If neither, then the following patch allows the 4 failing tests to
> produce executables and then pass. I obviously don't want to paper
> over a possible misconfiguration thus I post...
>
> Regards,
> Loren
>
> * testsuite/libgomp.fortran/omp_cond4.F90: Add -pthread to
> dg-options for *-*-freebsd*.
> * testsuite/libgomp.fortran/condinc2.f: Likewise.
> * testsuite/libgomp.fortran/condinc4.f90: Likewise.
> * testsuite/libgomp.fortran/omp_cond2.f: Likewise.
>
As a gfortran maintainer and FreeBSD user, I've always considered these
failures to be bogus. The inclusion of -lgomp and -pthread are tied
to -fopenmp. If you look at the failures, you'll see an ordering of
'-fopenmp -O -fno-openmp', which correctly disables the inclusion
of -lgomp and -pthread. The only problem is that
troutmask:sgk[251] find . -name \*.exp | xargs grep lgomp
./lib/libgomp.exp: lappend ALWAYS_CFLAGS "ldflags=-lgomp"
so dejagnu overrides -fno-openmp and adds -lgomp without adding
-pthread.
Your changes look correct to me, but I can't approve patches
in the libgomp hierarchy.
--
Steve