aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2020-07-01 12:33:59 +0200
committerThomas Schwinge <thomas@codesourcery.com>2020-07-24 14:00:43 +0200
commitfdc9db25395e5a6e77069c04fe713f165a9c52a4 (patch)
tree207631fdeb1534cb6ad2e91753b92c90312353e6 /libgomp
parent3407bfc136bb6b9cf8e25eb753b448b527590b3b (diff)
downloadgcc-fdc9db25395e5a6e77069c04fe713f165a9c52a4.zip
gcc-fdc9db25395e5a6e77069c04fe713f165a9c52a4.tar.gz
gcc-fdc9db25395e5a6e77069c04fe713f165a9c52a4.tar.bz2
[testsuite] Unset 'offload_target' after use
..., so that we don't leak this into '*.exp' files running later. This is relevant after commit efc16503ca10bc0e934e0bace5777500e4dc757a "handle dumpbase in offloading, adjust testsuite" -- I was confused why in a (simplified) testing sequence as follows: default 'libgomp.c/c.exp' default 'libgomp.oacc-c/c.exp' '-m32' 'libgomp.c/c.exp' '-m32' 'libgomp.oacc-c/c.exp' ..., the "'-m32' 'libgomp.c/c.exp'" variant would not execute any offloading dump scanning. The reason is that the "default 'libgomp.oacc-c/c.exp'" variant ends with 'offload_target=disable' set, so that's what the "'-m32' 'libgomp.c/c.exp'" variant would then see, in particular 'gcc/testsuite/lib/scanoffload.exp:scoff'. libgomp/ * testsuite/libgomp.oacc-c++/c++.exp: Unset 'offload_target' after use. * testsuite/libgomp.oacc-c/c.exp: Likewise. * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise.
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/testsuite/libgomp.oacc-c++/c++.exp1
-rw-r--r--libgomp/testsuite/libgomp.oacc-c/c.exp1
-rw-r--r--libgomp/testsuite/libgomp.oacc-fortran/fortran.exp1
3 files changed, 3 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.oacc-c++/c++.exp b/libgomp/testsuite/libgomp.oacc-c++/c++.exp
index 7200ec1..42e0395 100644
--- a/libgomp/testsuite/libgomp.oacc-c++/c++.exp
+++ b/libgomp/testsuite/libgomp.oacc-c++/c++.exp
@@ -149,6 +149,7 @@ if { $lang_test_file_found } {
gcc-dg-runtest $tests "$tagopt" "$libstdcxx_includes"
}
+ unset offload_target
} else {
# Call this once, which placates the subsequent torture-finish.
set-torture-options [list \
diff --git a/libgomp/testsuite/libgomp.oacc-c/c.exp b/libgomp/testsuite/libgomp.oacc-c/c.exp
index 48cbc98..4bb2b2a 100644
--- a/libgomp/testsuite/libgomp.oacc-c/c.exp
+++ b/libgomp/testsuite/libgomp.oacc-c/c.exp
@@ -112,6 +112,7 @@ foreach offload_target [concat [split $offload_targets ","] "disable"] {
gcc-dg-runtest $tests "$tagopt" ""
}
+unset offload_target
# All done.
torture-finish
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp b/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp
index d607903..7365b32 100644
--- a/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp
+++ b/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp
@@ -121,6 +121,7 @@ if { $lang_test_file_found } {
# typically not the case for C/C++.
gfortran-dg-runtest $tests "$tagopt" ""
}
+ unset offload_target
}
# All done.