On Thu, Sep 14, 2017 at 07:34:14PM +0000, de Vries, Tom wrote: > --- a/libgomp/testsuite/libgomp.c++/c++.exp > +++ b/libgomp/testsuite/libgomp.c++/c++.exp > @@ -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}"
I don't see SAVE_GCC_UNDER_TEST being used anywhere after it is set. Did you mean to set GCC_UNDER_TEST back to SAVE_GCC_UNDER_TEST at the end of c++.exp? libgomp.oacc-c++/c++.exp has: # See above. set GCC_UNDER_TEST "$SAVE_GCC_UNDER_TEST" Otherwise LGTM, thanks. Jakub