aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2023-05-10 14:43:21 +0200
committerThomas Schwinge <thomas@codesourcery.com>2023-05-15 12:11:17 +0200
commit30e42bb66d39f542cb76e40ad367a7ae7f376dc7 (patch)
tree1528c99bba0019a1384dfe205b5dc05bb16bcdd7 /libgomp
parent9be9be828dc9020735bc7eacddd1ceae1aeedb1b (diff)
downloadgcc-30e42bb66d39f542cb76e40ad367a7ae7f376dc7.zip
gcc-30e42bb66d39f542cb76e40ad367a7ae7f376dc7.tar.gz
gcc-30e42bb66d39f542cb76e40ad367a7ae7f376dc7.tar.bz2
libgomp testsuite: Have each '*.exp' file specify the compiler to use [PR91884]
..., which is still 'GCC_UNDER_TEST' for all of them; no change in behavior. PR testsuite/91884 libgomp/ * testsuite/lib/libgomp.exp (libgomp_target_compile): Don't specify compiler. * testsuite/libgomp.c++/c++.exp (ALWAYS_CFLAGS): Specify compiler. * testsuite/libgomp.c/c.exp (ALWAYS_CFLAGS): Likewise. * testsuite/libgomp.fortran/fortran.exp (ALWAYS_CFLAGS): Likewise. * testsuite/libgomp.graphite/graphite.exp (ALWAYS_CFLAGS): Likewise. * testsuite/libgomp.oacc-c++/c++.exp (ALWAYS_CFLAGS): Likewise. * testsuite/libgomp.oacc-c/c.exp (ALWAYS_CFLAGS): Likewise. * testsuite/libgomp.oacc-fortran/fortran.exp (ALWAYS_CFLAGS): Likewise.
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/testsuite/lib/libgomp.exp5
-rw-r--r--libgomp/testsuite/libgomp.c++/c++.exp10
-rw-r--r--libgomp/testsuite/libgomp.c/c.exp2
-rw-r--r--libgomp/testsuite/libgomp.fortran/fortran.exp1
-rw-r--r--libgomp/testsuite/libgomp.graphite/graphite.exp1
-rw-r--r--libgomp/testsuite/libgomp.oacc-c++/c++.exp10
-rw-r--r--libgomp/testsuite/libgomp.oacc-c/c.exp2
-rw-r--r--libgomp/testsuite/libgomp.oacc-fortran/fortran.exp1
8 files changed, 17 insertions, 15 deletions
diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp
index 9fea31d..48c43e4 100644
--- a/libgomp/testsuite/lib/libgomp.exp
+++ b/libgomp/testsuite/lib/libgomp.exp
@@ -46,10 +46,6 @@ load_file libgomp-test-support.exp
set dg-do-what-default run
-#
-# GCC_UNDER_TEST is the compiler under test.
-#
-
set libgomp_compile_options ""
#
@@ -262,7 +258,6 @@ proc libgomp_target_compile { source dest type options } {
lappend options "additional_flags=[libio_include_flags]"
lappend options "timeout=[timeout_value]"
- lappend options "compiler=$GCC_UNDER_TEST"
set options [concat $libgomp_compile_options $options]
diff --git a/libgomp/testsuite/libgomp.c++/c++.exp b/libgomp/testsuite/libgomp.c++/c++.exp
index 1a1c3ee..4110ada 100644
--- a/libgomp/testsuite/libgomp.c++/c++.exp
+++ b/libgomp/testsuite/libgomp.c++/c++.exp
@@ -16,6 +16,11 @@ if { $blddir != "" } {
return
}
set lang_link_flags "-lstdc++"
+# Switch into C++ mode. Otherwise, the 'libgomp.c-c++-common/*.c'
+# files would be compiled as C files.
+set SAVE_GCC_UNDER_TEST "$GCC_UNDER_TEST"
+set GCC_UNDER_TEST "$GCC_UNDER_TEST -x c++"
+lappend ALWAYS_CFLAGS "compiler=$GCC_UNDER_TEST"
# If a testcase doesn't have special options, use these.
if ![info exists DEFAULT_CFLAGS] then {
@@ -28,11 +33,6 @@ dg-init
# Turn on OpenMP.
lappend ALWAYS_CFLAGS "additional_flags=-fopenmp"
-# Switch into C++ mode. Otherwise, the libgomp.c-c++-common/*.c
-# files would be compiled as C files.
-set SAVE_GCC_UNDER_TEST "$GCC_UNDER_TEST"
-set GCC_UNDER_TEST "$GCC_UNDER_TEST -x c++"
-
# Gather a list of all tests.
set tests [lsort [concat \
[find $srcdir/$subdir *.C] \
diff --git a/libgomp/testsuite/libgomp.c/c.exp b/libgomp/testsuite/libgomp.c/c.exp
index 0ee28ed..aae2824 100644
--- a/libgomp/testsuite/libgomp.c/c.exp
+++ b/libgomp/testsuite/libgomp.c/c.exp
@@ -1,6 +1,8 @@
load_lib libgomp-dg.exp
load_gcc_lib gcc-dg.exp
+lappend ALWAYS_CFLAGS "compiler=$GCC_UNDER_TEST"
+
# If a testcase doesn't have special options, use these.
if ![info exists DEFAULT_CFLAGS] then {
set DEFAULT_CFLAGS "-O2"
diff --git a/libgomp/testsuite/libgomp.fortran/fortran.exp b/libgomp/testsuite/libgomp.fortran/fortran.exp
index 9295bba..9aeebd3 100644
--- a/libgomp/testsuite/libgomp.fortran/fortran.exp
+++ b/libgomp/testsuite/libgomp.fortran/fortran.exp
@@ -29,6 +29,7 @@ if { $blddir != "" } {
set lang_include_flags "-fintrinsic-modules-path=${blddir}"
}
set lang_link_flags "-lgfortran -foffload=-lgfortran"
+lappend ALWAYS_CFLAGS "compiler=$GCC_UNDER_TEST"
# Initialize dg.
dg-init
diff --git a/libgomp/testsuite/libgomp.graphite/graphite.exp b/libgomp/testsuite/libgomp.graphite/graphite.exp
index ff53a31..bc3a82d 100644
--- a/libgomp/testsuite/libgomp.graphite/graphite.exp
+++ b/libgomp/testsuite/libgomp.graphite/graphite.exp
@@ -25,6 +25,7 @@ if ![check_effective_target_fgraphite] {
return
}
+lappend ALWAYS_CFLAGS "compiler=$GCC_UNDER_TEST"
# Flags for force-parallel-*.c testcases.
set PARALLEL_CFLAGS "-ansi -pedantic-errors -O2 \
-ftree-parallelize-loops=4 -floop-parallelize-all \
diff --git a/libgomp/testsuite/libgomp.oacc-c++/c++.exp b/libgomp/testsuite/libgomp.oacc-c++/c++.exp
index 63d1d76..70fb9da 100644
--- a/libgomp/testsuite/libgomp.oacc-c++/c++.exp
+++ b/libgomp/testsuite/libgomp.oacc-c++/c++.exp
@@ -26,6 +26,11 @@ if { $blddir != "" } {
return
}
set lang_link_flags "-lstdc++"
+# Switch into C++ mode. Otherwise, the 'libgomp.oacc-c-c++-common/*.c'
+# files would be compiled as C files.
+set SAVE_GCC_UNDER_TEST "$GCC_UNDER_TEST"
+set GCC_UNDER_TEST "$GCC_UNDER_TEST -x c++"
+lappend ALWAYS_CFLAGS "compiler=$GCC_UNDER_TEST"
# Initialize dg.
dg-init
@@ -34,11 +39,6 @@ torture-init
# Turn on OpenACC.
lappend ALWAYS_CFLAGS "additional_flags=-fopenacc"
-# Switch into C++ mode. Otherwise, the libgomp.oacc-c-c++-common/*.c
-# files would be compiled as C files.
-set SAVE_GCC_UNDER_TEST "$GCC_UNDER_TEST"
-set GCC_UNDER_TEST "$GCC_UNDER_TEST -x c++"
-
# Gather a list of all tests.
set tests [lsort [concat \
[find $srcdir/$subdir *.C] \
diff --git a/libgomp/testsuite/libgomp.oacc-c/c.exp b/libgomp/testsuite/libgomp.oacc-c/c.exp
index ca61a82..8ca0c81 100644
--- a/libgomp/testsuite/libgomp.oacc-c/c.exp
+++ b/libgomp/testsuite/libgomp.oacc-c/c.exp
@@ -15,6 +15,8 @@ proc check_effective_target_c++ { } {
dg-init
torture-init
+lappend ALWAYS_CFLAGS "compiler=$GCC_UNDER_TEST"
+
# Turn on OpenACC.
lappend ALWAYS_CFLAGS "additional_flags=-fopenacc"
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp b/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp
index af0a4f7..56dd948 100644
--- a/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp
+++ b/libgomp/testsuite/libgomp.oacc-fortran/fortran.exp
@@ -31,6 +31,7 @@ if { $blddir != "" } {
set lang_include_flags "-fintrinsic-modules-path=${blddir}"
}
set lang_link_flags "-lgfortran -foffload=-lgfortran"
+lappend ALWAYS_CFLAGS "compiler=$GCC_UNDER_TEST"
# Initialize dg.
dg-init