blob: f372fbdc4376fa45dc50ea8ea7c2162f1581253f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/* { dg-do compile } */
#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;
}
}
}
return 0;
}
|