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