aboutsummaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.fortran
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2023-05-09 10:09:35 +0200
committerThomas Schwinge <thomas@codesourcery.com>2023-05-12 09:15:31 +0200
commitb1cdda9f361f678e4815a3d112ce92e8a73e782e (patch)
tree5d27c653c9c3b8b2cdadcb4d853218235d59666c /libgomp/testsuite/libgomp.fortran
parent4f67400b8475ee645e63f67bbb6b81ae1ab99ca8 (diff)
downloadgcc-b1cdda9f361f678e4815a3d112ce92e8a73e782e.zip
gcc-b1cdda9f361f678e4815a3d112ce92e8a73e782e.tar.gz
gcc-b1cdda9f361f678e4815a3d112ce92e8a73e782e.tar.bz2
libgomp testsuite: Localize 'lang_[...]' etc.
..., 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.
Diffstat (limited to 'libgomp/testsuite/libgomp.fortran')
-rw-r--r--libgomp/testsuite/libgomp.fortran/fortran.exp15
1 files changed, 10 insertions, 5 deletions
diff --git a/libgomp/testsuite/libgomp.fortran/fortran.exp b/libgomp/testsuite/libgomp.fortran/fortran.exp
index 5e8e15e..7ea00a2 100644
--- a/libgomp/testsuite/libgomp.fortran/fortran.exp
+++ b/libgomp/testsuite/libgomp.fortran/fortran.exp
@@ -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