Debian Codegraph @

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

raw
1 /* { dg-additional-options "-fdump-tree-original" } */
2
3 /* In OpenMP 5.2 permits tofrom for enter/exit data
4 in the FE, it is already converted to 'to' and 'from', respectively. */
5 int x, y, z;
6
7 void
8 copyin ()
9 {
10 #pragma omp target enter data map(x) map(tofrom: y) map(always, tofrom: z)
11 }
12
13 void
14 copyout ()
15 {
16 #pragma omp target exit data map(x) map(tofrom: y) map(always, tofrom: z)
17 }
18
19 /* { dg-final { scan-tree-dump-times "#pragma omp target enter data map\\(always,to:z\\) map\\(to:y\\) map\\(to:x\\)" 1 "original" } } */
20 /* { dg-final { scan-tree-dump-times "#pragma omp target exit data map\\(always,from:z\\) map\\(from:y\\) map\\(from:x\\)" 1 "original" } } */