[flang][cuda] Do not register global constants (#118582)
[llvm-project.git] / offload / test / offloading / bug47654.cpp
blobeba7904e76ca8a82883625368043735361661eab
1 // RUN: %libomptarget-compilexx-run-and-check-generic
2 // RUN: %libomptarget-compileoptxx-run-and-check-generic
4 #include <cassert>
5 #include <iostream>
7 int main(int argc, char *argv[]) {
8 int i = 0, j = 0;
10 #pragma omp target map(tofrom : i, j) nowait
12 i = 1;
13 j = 2;
16 #pragma omp taskwait
18 assert(i == 1);
19 assert(j == 2);
21 std::cout << "PASS\n";
23 return 0;
26 // CHECK: PASS