This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: RFC libgomp/testsuite/libgomp.fortran
- From: Loren James Rittle <rittle at latour dot labs dot mot dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: fortran at gcc dot gnu dot org, sje at cup dot hp dot com
- Date: Wed, 2 Sep 2009 17:31:16 -0500 (CDT)
- Subject: PATCH: RFC libgomp/testsuite/libgomp.fortran
- Reply-to: rittle at labs dot mot dot com
(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.
Index: libgomp/testsuite/libgomp.fortran/omp_cond4.F90
===================================================================
--- libgomp/testsuite/libgomp.fortran/omp_cond4.F90 (revision 151279)
+++ libgomp/testsuite/libgomp.fortran/omp_cond4.F90 (working copy)
@@ -1,5 +1,6 @@
! Test conditional compilation in free form if -fno-openmp
! { dg-options "-fno-openmp" }
+! { dg-options "-fno-openmp -pthread" { target *-*-freebsd* } }
10 foo = 2&
&56
if (foo.ne.256) call abort
Index: libgomp/testsuite/libgomp.fortran/condinc2.f
===================================================================
--- libgomp/testsuite/libgomp.fortran/condinc2.f (revision 151279)
+++ libgomp/testsuite/libgomp.fortran/condinc2.f (working copy)
@@ -1,4 +1,5 @@
! { dg-options "-fno-openmp" }
+! { dg-options "-fno-openmp -pthread" { target *-*-freebsd* } }
program condinc2
logical l
l = .true.
Index: libgomp/testsuite/libgomp.fortran/condinc4.f90
===================================================================
--- libgomp/testsuite/libgomp.fortran/condinc4.f90 (revision 151279)
+++ libgomp/testsuite/libgomp.fortran/condinc4.f90 (working copy)
@@ -1,4 +1,5 @@
! { dg-options "-fno-openmp" }
+! { dg-options "-fno-openmp -pthread" { target *-*-freebsd* } }
program condinc4
logical l
l = .true.
Index: libgomp/testsuite/libgomp.fortran/omp_cond2.f
===================================================================
--- libgomp/testsuite/libgomp.fortran/omp_cond2.f (revision 151279)
+++ libgomp/testsuite/libgomp.fortran/omp_cond2.f (working copy)
@@ -1,5 +1,6 @@
c Test conditional compilation in fixed form if -fno-openmp
! { dg-options "-fno-openmp" }
+! { dg-options "-fno-openmp -pthread" { target *-*-freebsd* } }
10 foo = 2
&56
if (foo.ne.256) call abort