gcc/libgomp/testsuite
Tom de Vries 6263b656c8 [libgomp, testsuite, nvptx] Fix pr96390.c without CUDA
When running the libgomp testsuite on x86_64 with nvptx accelerator, we run into:
...
XPASS: libgomp.c/../libgomp.c-c++-common/pr96390.c (test for excess errors)
FAIL: libgomp.c/../libgomp.c-c++-common/pr96390.c execution test
...

The problem is that we're expecting the following ptxas error:
...
XFAIL: libgomp.c/../libgomp.c-c++-common/pr96390.c (test for excess errors)
Excess errors:
ptxas /tmp/ccZYDw8N.o, line 90; error   : Call to 'baz' requires call prototype
ptxas /tmp/ccZYDw8N.o, line 90; error   : Unknown symbol 'baz'
...

But it's not triggered because ptxas is not in the path, so nvptx-none-as
defaults to --no-verify.

So instead, we run into the same error at execution time.

Fix this by forcing verification using:
...
/* { dg-additional-options "-foffload=-Wa,--verify" \
     { target offload_target_nvptx } } */
...
such that we run into the xfail in this way instead:
...
XFAIL: libgomp.c/../libgomp.c-c++-common/pr96390.c (test for excess errors)
Excess errors:
nvptx-as: error trying to exec 'ptxas': execvp: No such file or directory
nvptx-as: ptxas returned 255 exit status
...

Tested on x86_64-linux with nvptx accelerator.

libgomp/ChangeLog:

2022-02-21  Tom de Vries  <tdevries@suse.de>

	PR testsuite/104146
	* testsuite/libgomp.c++/pr96390.C: Add additional-option
	-foffload=-Wa,--verify for nvptx.
	* testsuite/libgomp.c-c++-common/pr96390.c: Same.
2022-02-22 10:23:20 +01:00
..
config Update copyright years. 2022-01-03 10:42:10 +01:00
lib Improve Intel MIC offloading XFAILing for 'omp_get_device_num' 2022-01-13 13:09:36 +01:00
libgomp.c C, C++, Fortran, OpenMP: Add 'has_device_addr' clause to 'target' construct. 2022-02-09 23:47:12 -08:00
libgomp.c-c++-common [libgomp, testsuite, nvptx] Fix pr96390.c without CUDA 2022-02-22 10:23:20 +01:00
libgomp.c++ [libgomp, testsuite, nvptx] Fix pr96390.c without CUDA 2022-02-22 10:23:20 +01:00
libgomp.fortran Fortran/OpenMP: Fix depend-clause handling 2022-02-15 12:26:48 +01:00
libgomp.graphite Update copyright years. 2022-01-03 10:42:10 +01:00
libgomp.oacc-c
libgomp.oacc-c-c++-common [nvptx] Add some support for .local atomics 2022-02-01 19:28:24 +01:00
libgomp.oacc-c++ nvptx: update fix for -Wformat-diag 2022-01-19 08:27:00 +01:00
libgomp.oacc-fortran [nvptx] Add some support for .local atomics 2022-02-01 19:28:24 +01:00
libgomp-site-extra.exp.in
libgomp-test-support.exp.in
Makefile.am
Makefile.in