1 | // clang-format off |
2 | // RUN: %libomptarget-compilexx-generic && env LIBOMPTARGET_DEBUG=1 %libomptarget-run-generic 2>&1 | %fcheck-generic |
3 | // clang-format on |
4 | |
5 | // REQUIRES: libomptarget-debug |
6 | |
7 | struct DataTy { |
8 | float a; |
9 | float b[3]; |
10 | }; |
11 | |
12 | int main(int argc, char **argv) { |
13 | DataTy D; |
14 | #pragma omp target map(D.a) map(D.b[ : 2]) |
15 | { |
16 | D.a = 0; |
17 | D.b[0] = 1; |
18 | } |
19 | return 0; |
20 | } |
21 | // clang-format off |
22 | // CHECK: omptarget --> Entry 0: Base=[[DAT_HST_PTR_BASE:0x.*]], Begin=[[DAT_HST_PTR_BASE]], Size=12 |
23 | // CHECK: omptarget --> Entry 1: Base=[[DAT_HST_PTR_BASE]], Begin=[[DAT_HST_PTR_BASE]], Size=4, |
24 | // CHECK: omptarget --> Entry 2: Base=[[DAT_HST_PTR_BASE]], Begin=[[DATUM_HST_PTR_BASE:0x.*]], Size=8, |
25 | // clang-format on |
26 | |