summaryrefslogtreecommitdiff
path: root/libgomp/testsuite
diff options
context:
space:
mode:
authortschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>2015-12-02 15:53:34 +0000
committertschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>2015-12-02 15:53:34 +0000
commit2a7545d57731de7d4918a8786c972259488dbc56 (patch)
treec8f7da9f522b4ae53b8fc0d2a564056033d1bbfb /libgomp/testsuite
parent96eefdee37b69af8ff1cef91563058d90fdb60a4 (diff)
downloadgcc-2a7545d57731de7d4918a8786c972259488dbc56.tar.gz
Some OpenACC host_data cleanup
gcc/c/ * c-parser.c (c_parser_omp_clause_name) (c_parser_oacc_all_clauses): Alphabetical sorting. gcc/cp/ * parser.c (cp_parser_omp_clause_name) (cp_parser_oacc_all_clauses): Alphabetical sorting. * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_USE_DEVICE. gcc/testsuite/ * c-c++-common/goacc/host_data-5.c: New file. * c-c++-common/goacc/host_data-6.c: Likewise. * gfortran.dg/goacc/coarray.f95: XFAIL. * gfortran.dg/goacc/coarray_2.f90: Adjust dg-excess-errors directive. * gfortran.dg/goacc/host_data-tree.f95: Remove dg-prune-output directive. libgomp/ * testsuite/libgomp.oacc-c-c++-common/host_data-2.c: Restrict to target openacc_nvidia_accel_selected. * testsuite/libgomp.oacc-c-c++-common/host_data-4.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/host_data-5.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/host_data-3.c: Remove file. * testsuite/libgomp.oacc-c-c++-common/host_data-6.c: Remove file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231184 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp/testsuite')
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-2.c2
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-3.c29
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-4.c2
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-5.c2
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-6.c31
5 files changed, 3 insertions, 63 deletions
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-2.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-2.c
index 98202867b4d..614f14324d4 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-2.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-2.c
@@ -1,4 +1,4 @@
-/* { dg-do run } */
+/* { dg-do run { target openacc_nvidia_accel_selected } } */
#include <stdlib.h>
#include <openacc.h>
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-3.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-3.c
deleted file mode 100644
index 7d9b5f72667..00000000000
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-3.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* { dg-do compile } */
-
-#include <openacc.h>
-#include <stdlib.h>
-
-#define N 1024
-
-int main (int argc, char* argv[])
-{
- int x[N];
-
-#pragma acc data copyin (x[0:N])
- {
- int *xp;
-#pragma acc host_data use_device (x)
- {
- /* This use of the present clause is undefined behaviour for OpenACC. */
-#pragma acc parallel present (x) copyout (xp) /* { dg-error "variable 'x' declared in enclosing 'host_data' region" } */
- {
- xp = x;
- }
- }
-
- if (xp != acc_deviceptr (x))
- abort ();
- }
-
- return 0;
-}
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-4.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-4.c
index 3504f2710fd..0ab5a356912 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-4.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-4.c
@@ -1,4 +1,4 @@
-/* { dg-do run } */
+/* { dg-do run { target openacc_nvidia_accel_selected } } */
#include <openacc.h>
#include <stdlib.h>
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-5.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-5.c
index 268e9194d35..a3737a7dae0 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-5.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-5.c
@@ -1,4 +1,4 @@
-/* { dg-do run } */
+/* { dg-do run { target openacc_nvidia_accel_selected } } */
#include <openacc.h>
#include <stdlib.h>
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-6.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-6.c
deleted file mode 100644
index a841488515e..00000000000
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/host_data-6.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* { dg-do compile } */
-
-#include <openacc.h>
-#include <stdlib.h>
-
-#define N 1024
-
-int main (int argc, char* argv[])
-{
- int x[N];
-
-#pragma acc data copyin (x[0:N])
- {
- int *xp;
-#pragma acc host_data use_device (x)
- {
- /* Here 'x' being implicitly firstprivate for the parallel region
- conflicts with it being declared as use_device in the enclosing
- host_data region. */
-#pragma acc parallel copyout (xp)
- {
- xp = x; /* { dg-error "variable 'x' declared in enclosing 'host_data' region" } */
- }
- }
-
- if (xp != acc_deviceptr (x))
- abort ();
- }
-
- return 0;
-}