Debian Codegraph @

gcc/testsuite/c-c++-common/gomp/target-data-3.c

raw
1 /* In OpenMP 5.2 permits tofrom for enter/exit data
2 in the FE, it is already converted to 'to' and 'from', respectively. */
3 int y, z;
4
5 void
6 copyin ()
7 {
8 #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" } */
9 #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" } */
10 }
11
12 void
13 copyout ()
14 {
15 #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" } */
16 #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" } */
17 }