]> gcc.gnu.org Git - gcc.git/commitdiff
[testsuite] Unset 'offload_target' after use
authorThomas Schwinge <thomas@codesourcery.com>
Wed, 1 Jul 2020 10:33:59 +0000 (12:33 +0200)
committerThomas Schwinge <thomas@codesourcery.com>
Fri, 24 Jul 2020 12:00:43 +0000 (14:00 +0200)
..., 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.

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

index 7200ec19c476cf5f6a369a34d02fea27bba83202..42e0395f9a50222e8e9a0caf21c80adb7b7073ff 100644 (file)
@@ -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 \
index 48cbc980731b8bfbcea83e4a8949b159e71d0315..4bb2b2ac4949f82bae7b6fe01b40f5c77e979b27 100644 (file)
@@ -112,6 +112,7 @@ foreach offload_target [concat [split $offload_targets ","] "disable"] {
 
     gcc-dg-runtest $tests "$tagopt" ""
 }
+unset offload_target
 
 # All done.
 torture-finish
index d60790325053f60277cca560dec9653c8a109c30..7365b320668aad63130004771fd6b5d3f4f440d2 100644 (file)
@@ -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.
This page took 0.068621 seconds and 5 git commands to generate.