]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgomp testsuite: Have each '*.exp' file specify the compiler to use [PR91884]
authorThomas Schwinge <thomas@codesourcery.com>
Wed, 10 May 2023 12:43:21 +0000 (14:43 +0200)
committerThomas Schwinge <thomas@codesourcery.com>
Mon, 15 May 2023 10:11:17 +0000 (12:11 +0200)
..., 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.

libgomp/testsuite/lib/libgomp.exp
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 9fea31d8067263cb4b5e8e96f3190fbd8f20dbc9..48c43e4a136e39557a6be51f16739ceaf67c6c74 100644 (file)
@@ -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]
 
index 1a1c3ee2225298d8901ca4fafd34451af8498bcb..4110ada7c46e6c305c600cedef18c63d58c8b8d9 100644 (file)
@@ -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] \
index 0ee28ed723e245b46c2073fe36f0b4960eda23bf..aae282478dbcc4568ee508bc279db289e4989e94 100644 (file)
@@ -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"
index 9295bbae65dd80850db55e4a4b530570dcce5fa3..9aeebd3af7cdc42c7a52550b4377f3ff2fd01b48 100644 (file)
@@ -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
index ff53a31272c4bbadcabd9ee0e964776df93660ef..bc3a82d8804a88400473f854982db2be98476f36 100644 (file)
@@ -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 \
index 63d1d7650a20da0f46087b56f4d0dcaa6e971749..70fb9da0ef4e4bc66ee581b6b695936b4d3d2791 100644 (file)
@@ -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] \
index ca61a82937a39b0075108b73b6abf7cf00ac792d..8ca0c81687cc1305495da4a069e0ae90b3205619 100644 (file)
@@ -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"
 
index af0a4f7ff3111556ffc1fe5441c423a83a1861b0..56dd9485339009ecba1540aa401de9554521e3b7 100644 (file)
@@ -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