This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[libgomp] fix testsuite for running individual languages


Running only the C++ or Fortran libgomp tests doesn't work because a
variable defined in libgomp_init is used before it has been set.  This
patch fixes that by invoking libgomp_init for each directory of tests.
The call for each test is no longer needed, so that's removed.

Tested on powerpc64-linux for -m32/-m64.  I'll check this in on trunk
and the 4.2 branch next week unless there are objections.

2006-12-15  Janis Johnson  <janis187@us.ibm.com>

	* testsuite/lib/libgomp-dg.exp (libgomp_target_compile): Don't
	call libgomp_init.
	* testsuite/libgomp.c/c.exp: Call libgomp_init.
	* testsuite/libgomp.c++/c++.exp: Ditto.
	* testsuite/libgomp.fortran/fortran.exp: Ditto.

Index: libgomp/testsuite/lib/libgomp-dg.exp
===================================================================
--- libgomp/testsuite/lib/libgomp-dg.exp	(revision 119741)
+++ libgomp/testsuite/lib/libgomp-dg.exp	(working copy)
@@ -33,7 +33,7 @@
 set libgomp_compile_options ""
 
 #
-# libgomp_init -- This gets run more than it should be....
+# libgomp_init
 #
 
 if [info exists TOOL_OPTIONS] {
@@ -160,8 +160,6 @@
     global ALWAYS_CFLAGS
     global GCC_UNDER_TEST
 
-    libgomp_init
-
     if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } {
 	lappend options "libs=${gluefile}"
 	lappend options "ldflags=${wrap_flags}"
Index: libgomp/testsuite/libgomp.c/c.exp
===================================================================
--- libgomp/testsuite/libgomp.c/c.exp	(revision 119741)
+++ libgomp/testsuite/libgomp.c/c.exp	(working copy)
@@ -13,6 +13,7 @@
 
 # Initialize dg.
 dg-init
+libgomp_init
 
 # Gather a list of all tests.
 set tests [lsort [find $srcdir/$subdir *.c]]
Index: libgomp/testsuite/libgomp.c++/c++.exp
===================================================================
--- libgomp/testsuite/libgomp.c++/c++.exp	(revision 119741)
+++ libgomp/testsuite/libgomp.c++/c++.exp	(working copy)
@@ -6,6 +6,7 @@
 
 # Initialize dg.
 dg-init
+libgomp_init
 
 if [file exists "${blddir}/${lang_test_file}"] {
 
Index: libgomp/testsuite/libgomp.fortran/fortran.exp
===================================================================
--- libgomp/testsuite/libgomp.fortran/fortran.exp	(revision 119741)
+++ libgomp/testsuite/libgomp.fortran/fortran.exp	(working copy)
@@ -6,6 +6,7 @@
 
 # Initialize dg.
 dg-init
+libgomp_init
 
 if [file exists "${blddir}/${lang_test_file}"] {
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]