aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorTobias Burnus <tobias@codesourcery.com>2021-03-29 10:38:39 +0200
committerTobias Burnus <tobias@codesourcery.com>2021-03-29 10:40:38 +0200
commitd579e2e76f9469e1b386d693af57c5c4f0ede410 (patch)
tree318d1547f457f8f844d200e37fb63f3795241500 /libgomp
parentc411011287f707d42fd582a01de2ed0d36867211 (diff)
downloadgcc-d579e2e76f9469e1b386d693af57c5c4f0ede410.zip
gcc-d579e2e76f9469e1b386d693af57c5c4f0ede410.tar.gz
gcc-d579e2e76f9469e1b386d693af57c5c4f0ede410.tar.bz2
libgomp: Fix on_device_arch.c aux-file handling [PR99555]
libgomp/ChangeLog: PR target/99555 * testsuite/lib/on_device_arch.c: Move to ... * testsuite/libgomp.c-c++-common/on_device_arch.h: ... here. * testsuite/libgomp.fortran/on_device_arch.c: New file; #include on_device_arch.h. * testsuite/libgomp.c-c++-common/task-detach-6.c: #include on_device_arch.h instead of using dg-additional-source. * testsuite/libgomp.c/pr99555-1.c: Likewise. * testsuite/libgomp.fortran/task-detach-6.f90: Update to use on_device_arch.c without relative paths.
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/testsuite/libgomp.c-c++-common/on_device_arch.h (renamed from libgomp/testsuite/lib/on_device_arch.c)0
-rw-r--r--libgomp/testsuite/libgomp.c-c++-common/task-detach-6.c4
-rw-r--r--libgomp/testsuite/libgomp.c/pr99555-1.c3
-rw-r--r--libgomp/testsuite/libgomp.fortran/on_device_arch.c3
-rw-r--r--libgomp/testsuite/libgomp.fortran/task-detach-6.f902
5 files changed, 6 insertions, 6 deletions
diff --git a/libgomp/testsuite/lib/on_device_arch.c b/libgomp/testsuite/libgomp.c-c++-common/on_device_arch.h
index 1c0753c..1c0753c 100644
--- a/libgomp/testsuite/lib/on_device_arch.c
+++ b/libgomp/testsuite/libgomp.c-c++-common/on_device_arch.h
diff --git a/libgomp/testsuite/libgomp.c-c++-common/task-detach-6.c b/libgomp/testsuite/libgomp.c-c++-common/task-detach-6.c
index 4a3e4a2..119d7f5 100644
--- a/libgomp/testsuite/libgomp.c-c++-common/task-detach-6.c
+++ b/libgomp/testsuite/libgomp.c-c++-common/task-detach-6.c
@@ -1,10 +1,8 @@
/* { dg-do run } */
-/* { dg-additional-sources "../lib/on_device_arch.c" } */
-extern int on_device_arch_nvptx ();
-
#include <omp.h>
#include <assert.h>
+#include "on_device_arch.h"
/* Test tasks with detach clause on an offload device. Each device
thread spawns off a chain of tasks, that can then be executed by
diff --git a/libgomp/testsuite/libgomp.c/pr99555-1.c b/libgomp/testsuite/libgomp.c/pr99555-1.c
index 9ba3309..0dc17bf 100644
--- a/libgomp/testsuite/libgomp.c/pr99555-1.c
+++ b/libgomp/testsuite/libgomp.c/pr99555-1.c
@@ -2,8 +2,7 @@
// { dg-additional-options "-O0" }
-// { dg-additional-sources "../lib/on_device_arch.c" }
-extern int on_device_arch_nvptx ();
+#include "../libgomp.c-c++-common/on_device_arch.h"
int main (void)
{
diff --git a/libgomp/testsuite/libgomp.fortran/on_device_arch.c b/libgomp/testsuite/libgomp.fortran/on_device_arch.c
new file mode 100644
index 0000000..98822c4
--- /dev/null
+++ b/libgomp/testsuite/libgomp.fortran/on_device_arch.c
@@ -0,0 +1,3 @@
+/* Auxiliar file. */
+/* { dg-do compile { target skip-all-targets } } */
+#include "../libgomp.c-c++-common/on_device_arch.h"
diff --git a/libgomp/testsuite/libgomp.fortran/task-detach-6.f90 b/libgomp/testsuite/libgomp.fortran/task-detach-6.f90
index eda20e7..bd0beb6 100644
--- a/libgomp/testsuite/libgomp.fortran/task-detach-6.f90
+++ b/libgomp/testsuite/libgomp.fortran/task-detach-6.f90
@@ -1,6 +1,6 @@
! { dg-do run }
-! { dg-additional-sources ../lib/on_device_arch.c }
+! { dg-additional-sources on_device_arch.c }
! { dg-prune-output "command-line option '-fintrinsic-modules-path=.*' is valid for Fortran but not for C" }
! Test tasks with detach clause on an offload device. Each device