aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/gomp/target-data-3.c
blob: 8c6d5cb88698d93a20a12f3bcb7ce3cc4155cfeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* In OpenMP 5.2 permits tofrom for enter/exit data
   in the FE, it is already converted to 'to' and 'from', respectively. */
int y, z;

void
copyin ()
{
  #pragma omp target enter data map(from: y)         /* { dg-error "'#pragma omp target enter data' with map-type other than 'to', 'tofrom' or 'alloc' on 'map' clause" } */
  #pragma omp target enter data map(always, from: z) /* { dg-error "'#pragma omp target enter data' with map-type other than 'to', 'tofrom' or 'alloc' on 'map' clause" } */
}

void
copyout ()
{
  #pragma omp target exit data map(to: y)         /* { dg-error "'#pragma omp target exit data' with map-type other than 'from', 'tofrom', 'release' or 'delete' on 'map' clause" } */
  #pragma omp target exit data map(always, to: z) /* { dg-error "'#pragma omp target exit data' with map-type other than 'from', 'tofrom', 'release' or 'delete' on 'map' clause" } */
}