1 // RUN: %libomptarget-compile-run-and-check-generic
5 // OpenMP 5.1, sec. 2.21.7.1 "map Clause", p. 351 L14-16:
6 // "If the map clause appears on a target, target data, or target exit data
7 // construct and a corresponding list item of the original list item is not
8 // present in the device data environment on exit from the region then the
9 // list item is ignored."
12 int f
= 5, r
= 6, d
= 7, af
= 8;
14 // Check exit from omp target data.
15 // CHECK: f = 5, af = 8
16 #pragma omp target data map(from : f) map(always, from : af)
18 #pragma omp target exit data map(delete : f, af)
19 } printf("f = %d, af = %d\n", f
, af
);
21 // Check omp target exit data.
22 // CHECK: f = 5, r = 6, d = 7, af = 8
23 #pragma omp target exit data map(from : f) map(release : r) map(delete : d) \
24 map(always, from : af)
25 printf("f = %d, r = %d, d = %d, af = %d\n", f
, r
, d
, af
);