1 // RUN: %libomptarget-compilexx-run-and-check-aarch64-unknown-linux-gnu
2 // RUN: %libomptarget-compilexx-run-and-check-powerpc64-ibm-linux-gnu
3 // RUN: %libomptarget-compilexx-run-and-check-powerpc64le-ibm-linux-gnu
4 // RUN: %libomptarget-compilexx-run-and-check-x86_64-pc-linux-gnu
5 // RUN: %libomptarget-compilexx-run-and-check-nvptx64-nvidia-cuda
6
7 #include <cassert>
8 #include <iostream>
9
main(int argc,char * argv[])10 int main(int argc, char *argv[]) {
11 int i = 0, j = 0;
12
13 #pragma omp target map(tofrom : i, j) nowait
14 {
15 i = 1;
16 j = 2;
17 }
18
19 #pragma omp taskwait
20
21 assert(i == 1);
22 assert(j == 2);
23
24 std::cout << "PASS\n";
25
26 return 0;
27 }
28
29 // CHECK: PASS
30