]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgomp testsuite: Localize 'lang_[...]' etc.
authorThomas Schwinge <thomas@codesourcery.com>
Tue, 9 May 2023 08:09:35 +0000 (10:09 +0200)
committerThomas Schwinge <thomas@codesourcery.com>
Fri, 12 May 2023 07:15:31 +0000 (09:15 +0200)
..., instead of letting them bleed into the next '*.exp' file, requiring
clean-up there.

libgomp/
* testsuite/libgomp.c++/c++.exp: Localize 'lang_[...]' etc.
* testsuite/libgomp.c/c.exp: Likewise.
* testsuite/libgomp.fortran/fortran.exp: Likewise.
* testsuite/libgomp.graphite/graphite.exp: Likewise.
* testsuite/libgomp.oacc-c++/c++.exp: Likewise.
* testsuite/libgomp.oacc-c/c.exp: Likewise.
* testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.

libgomp/testsuite/libgomp.c++/c++.exp
libgomp/testsuite/libgomp.c/c.exp
libgomp/testsuite/libgomp.fortran/fortran.exp
libgomp/testsuite/libgomp.graphite/graphite.exp
libgomp/testsuite/libgomp.oacc-c++/c++.exp
libgomp/testsuite/libgomp.oacc-c/c.exp
libgomp/testsuite/libgomp.oacc-fortran/fortran.exp

index 7dd2d49d568e338c798836076dbeb00c93f70a36..442e9f744d0289f6a6fa888c75f70d8e0f75c872 100644 (file)
@@ -7,9 +7,6 @@ set shlib_ext [get_shlib_extension]
 set lang_link_flags "-lstdc++"
 set lang_test_file_found 0
 set lang_library_path "../libstdc++-v3/src/.libs"
-if [info exists lang_include_flags] then {
-    unset lang_include_flags
-}
 
 # If a testcase doesn't have special options, use these.
 if ![info exists DEFAULT_CFLAGS] then {
@@ -71,5 +68,13 @@ if { $lang_test_file_found } {
 # See above.
 set GCC_UNDER_TEST "$SAVE_GCC_UNDER_TEST"
 
+if [info exists lang_include_flags] then {
+    unset lang_source_re
+    unset lang_include_flags
+}
+unset lang_library_path
+unset lang_link_flags
+unset lang_test_file_found
+
 # All done.
 dg-finish
index e67adc8b378c2eb3b9afeb5c4f832c93fc0f9945..0ee28ed723e245b46c2073fe36f0b4960eda23bf 100644 (file)
@@ -1,14 +1,3 @@
-if [info exists lang_library_path] then {
-    unset lang_library_path
-    unset lang_link_flags
-}
-if [info exists lang_test_file_found] then {
-    unset lang_test_file_found
-}
-if [info exists lang_include_flags] then {
-    unset lang_include_flags
-}
-
 load_lib libgomp-dg.exp
 load_gcc_lib gcc-dg.exp
 
index 5e8e15e7743e35b6825c319f4ae175cdd09476c0..7ea00a25bd9965c06f66dc45267939defc300083 100644 (file)
@@ -8,12 +8,7 @@ global ALWAYS_CFLAGS
 set shlib_ext [get_shlib_extension]
 set lang_library_path  "../libgfortran/.libs"
 set lang_link_flags    "-lgfortran -foffload=-lgfortran"
-if [info exists lang_include_flags] then {
-    unset lang_include_flags
-}
 set lang_test_file_found 0
-set quadmath_library_path "../libquadmath/.libs"
-
 
 # Initialize dg.
 dg-init
@@ -44,6 +39,7 @@ if { $lang_test_file_found } {
     set tests [lsort [find $srcdir/$subdir *.\[fF\]{,90,95,03,08}]]
 
     if { $blddir != "" } {
+       set quadmath_library_path "../libquadmath/.libs"
        if { [file exists "${blddir}/${quadmath_library_path}/libquadmath.a"]
             || [file exists "${blddir}/${quadmath_library_path}/libquadmath.${shlib_ext}"] } {
            lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/${quadmath_library_path}/"
@@ -54,6 +50,7 @@ if { $lang_test_file_found } {
        } else {
            set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}"
        }
+       unset quadmath_library_path
     } else {
         set ld_library_path "$always_ld_library_path"
         if { [check_no_compiler_messages has_libquadmath executable {
@@ -71,5 +68,13 @@ if { $lang_test_file_found } {
     gfortran-dg-runtest $tests "" ""
 }
 
+if { $blddir != "" } {
+    unset lang_source_re
+    unset lang_include_flags
+}
+unset lang_library_path
+unset lang_link_flags
+unset lang_test_file_found
+
 # All done.
 dg-finish
index 1c5ea663af34bea91ea025bc1518ffd27577ef8a..ff53a31272c4bbadcabd9ee0e964776df93660ef 100644 (file)
 # along with GCC; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
 
-if [info exists lang_library_path] then {
-    unset lang_library_path
-    unset lang_link_flags
-}
-if [info exists lang_test_file_found] then {
-    unset lang_test_file_found
-}
-if [info exists lang_include_flags] then {
-    unset lang_include_flags
-}
-
 load_lib libgomp-dg.exp
 load_gcc_lib gcc-dg.exp
 
index 24ab8bb35ff51833a97f58422846ae9d46ecc757..5d9dc5d4a3f9c688338a29eeb2844958f9e3aff2 100644 (file)
@@ -17,9 +17,6 @@ set shlib_ext [get_shlib_extension]
 set lang_link_flags "-lstdc++"
 set lang_test_file_found 0
 set lang_library_path "../libstdc++-v3/src/.libs"
-if [info exists lang_include_flags] then {
-    unset lang_include_flags
-}
 
 # Initialize dg.
 dg-init
@@ -152,6 +149,14 @@ if { $lang_test_file_found } {
 # See above.
 set GCC_UNDER_TEST "$SAVE_GCC_UNDER_TEST"
 
+if [info exists lang_include_flags] then {
+    unset lang_source_re
+    unset lang_include_flags
+}
+unset lang_library_path
+unset lang_link_flags
+unset lang_test_file_found
+
 # All done.
 torture-finish
 dg-finish
index 8a960aafadc1763f9465771d0c0a97e7e8ef4539..ca61a82937a39b0075108b73b6abf7cf00ac792d 100644 (file)
@@ -1,16 +1,5 @@
 # This whole file adapted from libgomp.c/c.exp.
 
-if [info exists lang_library_path] then {
-    unset lang_library_path
-    unset lang_link_flags
-}
-if [info exists lang_test_file_found] then {
-    unset lang_test_file_found
-}
-if [info exists lang_include_flags] then {
-    unset lang_include_flags
-}
-
 load_lib libgomp-dg.exp
 load_gcc_lib gcc-dg.exp
 load_gcc_lib torture-options.exp
index a56c7d903509d56a4e632cf8a68f66cd4291ef6e..1ac2320ec22d6dd943a8bcf6da9c1142bd380294 100644 (file)
@@ -10,12 +10,7 @@ global ALWAYS_CFLAGS
 set shlib_ext [get_shlib_extension]
 set lang_library_path  "../libgfortran/.libs"
 set lang_link_flags    "-lgfortran -foffload=-lgfortran"
-if [info exists lang_include_flags] then {
-    unset lang_include_flags
-}
 set lang_test_file_found 0
-set quadmath_library_path "../libquadmath/.libs"
-
 
 # Initialize dg.
 dg-init
@@ -46,6 +41,7 @@ if { $lang_test_file_found } {
     set tests [lsort [find $srcdir/$subdir *.\[fF\]{,90,95,03,08}]]
 
     if { $blddir != "" } {
+       set quadmath_library_path "../libquadmath/.libs"
        if { [file exists "${blddir}/${quadmath_library_path}/libquadmath.a"]
             || [file exists "${blddir}/${quadmath_library_path}/libquadmath.${shlib_ext}"] } {
            lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/${quadmath_library_path}/"
@@ -56,6 +52,7 @@ if { $lang_test_file_found } {
        } else {
            set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}"
        }
+       unset quadmath_library_path
     } else {
         set ld_library_path "$always_ld_library_path"
         if { [check_no_compiler_messages has_libquadmath executable {
@@ -120,5 +117,13 @@ if { $lang_test_file_found } {
     unset offload_target
 }
 
+if { $blddir != "" } {
+    unset lang_source_re
+    unset lang_include_flags
+}
+unset lang_library_path
+unset lang_link_flags
+unset lang_test_file_found
+
 # All done.
 dg-finish