ff7a55bf56
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. Co-Authored-By: James Norris <James_Norris@mentor.com> Co-Authored-By: Julian Brown <julian@codesourcery.com> From-SVN: r231184
39 lines
535 B
C
39 lines
535 B
C
/* { dg-do run { target openacc_nvidia_accel_selected } } */
|
|
|
|
#include <openacc.h>
|
|
#include <stdlib.h>
|
|
|
|
#define N 1024
|
|
|
|
int main (int argc, char* argv[])
|
|
{
|
|
int x[N], y[N], *yp;
|
|
|
|
yp = y + 1;
|
|
|
|
#pragma acc data copyin (x[0:N])
|
|
{
|
|
int *xp, *yp2;
|
|
#pragma acc host_data use_device (x)
|
|
{
|
|
#pragma acc data copyin (y)
|
|
{
|
|
#pragma acc host_data use_device (yp)
|
|
{
|
|
xp = x;
|
|
yp2 = yp;
|
|
}
|
|
|
|
if (yp2 != acc_deviceptr (yp))
|
|
abort ();
|
|
}
|
|
}
|
|
|
|
if (xp != acc_deviceptr (x))
|
|
abort ();
|
|
|
|
}
|
|
|
|
return 0;
|
|
}
|