PATCH: RFC libgomp/testsuite/libgomp.fortran

Loren James Rittle rittle@latour.labs.mot.com
Wed Sep 2 22:33:00 GMT 2009


(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



More information about the Gcc-patches mailing list