| // RUN: %libomptarget-compilexx-run-and-check-aarch64-unknown-linux-gnu |
| // RUN: %libomptarget-compilexx-run-and-check-powerpc64-ibm-linux-gnu |
| // RUN: %libomptarget-compilexx-run-and-check-powerpc64le-ibm-linux-gnu |
| // RUN: %libomptarget-compilexx-run-and-check-x86_64-unknown-linux-gnu |
| // RUN: %libomptarget-compilexx-run-and-check-nvptx64-nvidia-cuda |
| #pragma omp declare mapper(C1 s) map(to : s.a) map(from : s.b[0 : 2]) |
| #pragma omp declare mapper(C s) map(to : s.a, s.c) map(from : s.b[0 : 2]) |
| printf("%d %d %d %4.5f %d\n", sp[0].e, sp[0].f.a, sp[0].f.c.a, sp[0].f.b[1], |
| sp[0].f.b == &x[0] ? 1 : 0); |
| // CHECK: 111 222 777 20.00000 1 |
| __intptr_t p = reinterpret_cast<__intptr_t>(&x[0]); |
| #pragma omp target map(tofrom : sp[0]) firstprivate(p) |
| printf("%d %d %d\n", sp[0].f.a, sp[0].f.c.a, |
| sp[0].f.b == reinterpret_cast<void *>(p) ? 1 : 0); |
| printf("%d %d %d %4.5f %d\n", sp[0].e, sp[0].f.a, sp[0].f.c.a, sp[0].f.b[1], |
| sp[0].f.b == &x[0] ? 1 : 0); |
| // CHECK: 333 222 777 40.00000 1 |