Introduce libgomp/testsuite/libgomp.c-c++-common

2017-09-14  Tom de Vries  <tom@codesourcery.com>

	* testsuite/libgomp.c++/cancel-taskgroup-1.C: Remove.
	* testsuite/libgomp.c/cancel-taskgroup-1.c: Move to ...
	* testsuite/libgomp.c-c++-common/cancel-taskgroup-1.c: ... here.
	* testsuite/libgomp.c/c.exp: Include test-cases from
	libgomp.c-c++-common.
	* testsuite/libgomp.c++/c++.exp: Same.  Force c++-mode compilation of .c
	files.

From-SVN: r252775
This commit is contained in:
Tom de Vries 2017-09-14 21:15:40 +00:00 committed by Tom de Vries
parent 12fca96eb3
commit 82419efbbf
5 changed files with 24 additions and 6 deletions

View File

@ -1,3 +1,13 @@
2017-09-14 Tom de Vries <tom@codesourcery.com>
* testsuite/libgomp.c++/cancel-taskgroup-1.C: Remove.
* testsuite/libgomp.c/cancel-taskgroup-1.c: Move to ...
* testsuite/libgomp.c-c++-common/cancel-taskgroup-1.c: ... here.
* testsuite/libgomp.c/c.exp: Include test-cases from
libgomp.c-c++-common.
* testsuite/libgomp.c++/c++.exp: Same. Force c++-mode compilation of .c
files.
2017-09-14 Jakub Jelinek <jakub@redhat.com>
PR c++/81314

View File

@ -22,6 +22,11 @@ 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++"
set blddir [lookfor_file [get_multilibs] libgomp]
@ -47,7 +52,9 @@ if { $blddir != "" } {
if { $lang_test_file_found } {
# Gather a list of all tests.
set tests [lsort [find $srcdir/$subdir *.C]]
set tests [lsort [concat \
[find $srcdir/$subdir *.C] \
[find $srcdir/$subdir/../libgomp.c-c++-common *.c]]]
if { $blddir != "" } {
set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}"
@ -68,5 +75,8 @@ if { $lang_test_file_found } {
dg-runtest $tests "" "$libstdcxx_includes $DEFAULT_CFLAGS"
}
# See above.
set GCC_UNDER_TEST "$SAVE_GCC_UNDER_TEST"
# All done.
dg-finish

View File

@ -1,4 +0,0 @@
// { dg-do run }
// { dg-set-target-env-var OMP_CANCELLATION "true" }
#include "../libgomp.c/cancel-taskgroup-1.c"

View File

@ -24,7 +24,9 @@ dg-init
lappend ALWAYS_CFLAGS "additional_flags=-fopenmp"
# Gather a list of all tests.
set tests [lsort [find $srcdir/$subdir *.c]]
set tests [lsort [concat \
[find $srcdir/$subdir *.c] \
[find $srcdir/$subdir/../libgomp.c-c++-common *.c]]]
set ld_library_path $always_ld_library_path
append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]