]> git.ipfire.org Git - thirdparty/gcc.git/commit
Make the OpenMP 'error' directive work for nvptx offloading
authorThomas Schwinge <thomas@codesourcery.com>
Mon, 23 Aug 2021 13:22:38 +0000 (15:22 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Mon, 23 Aug 2021 13:22:38 +0000 (15:22 +0200)
commit700448b8610908c0dfa192b094d2d91849c119cd
tree8b848e529905bc85c41a6abc0efc6da0f57d646f
parent47f4a06652b942fc1db8f0e4a2590f9ee84b3621
Make the OpenMP 'error' directive work for nvptx offloading

... and add a minimum amount of offloading testing.

(Leaving aside that 'fwrite' to 'stderr' probably wouldn't work anyway) the
'fwrite' calls in 'libgomp/error.c:GOMP_warning', 'libgomp/error.c:GOMP_error'
drag in 'isatty', which isn't provided by my nvptx newlib build at present, so
we get, for example:

    [...]
    FAIL: libgomp.c/../libgomp.c-c++-common/declare_target-1.c (test for excess errors)
    Excess errors:
    unresolved symbol isatty
    mkoffload: fatal error: [...]/build-gcc/./gcc/x86_64-pc-linux-gnu-accel-nvptx-none-gcc returned 1 exit status
    [...]

..., and many more.

Fix up for recent commit 0d973c0a0d90a0a302e7eda1a4d9709be3c5b102
"openmp: Implement the error directive".

libgomp/
* config/nvptx/error.c (fwrite, exit): Override, too.
* testsuite/libgomp.c-c++-common/error-1.c: Add a minimum amount
of offloading testing.
* testsuite/libgomp.fortran/error-1.f90: Likewise.

(cherry picked from commit a5416bf369419428fb139c432bcd88f6f8ee4910)
libgomp/ChangeLog.omp
libgomp/config/nvptx/error.c
libgomp/testsuite/libgomp.c-c++-common/error-1.c
libgomp/testsuite/libgomp.fortran/error-1.f90