1 // RUN: %libomptarget-compilexx-run-and-check-generic
10 #pragma omp declare mapper(C1 s) map(to : s.a) map(from : s.b[0 : 2])
17 #pragma omp declare mapper(C s) map(to : s.a, s.c) map(from : s.b[0 : 2])
41 printf("%d %d %d %4.5f %d\n", spp
[0][0].e
, spp
[0][0].f
.a
, spp
[0][0].f
.c
.a
,
42 spp
[0][0].f
.b
[1], spp
[0][0].f
.b
== &x
[0] ? 1 : 0);
43 // CHECK: 111 222 777 20.00000 1
45 int spp00fa
= -1, spp00fca
= -1, spp00fb_r
= -1;
46 __intptr_t p
= reinterpret_cast<__intptr_t
>(&x
[0]);
47 #pragma omp target map(tofrom: spp[0][0]) firstprivate(p) \
48 map(from: spp00fa, spp00fca, spp00fb_r)
50 spp00fa
= spp
[0][0].f
.a
;
51 spp00fca
= spp
[0][0].f
.c
.a
;
52 spp00fb_r
= spp
[0][0].f
.b
== reinterpret_cast<void *>(p
) ? 1 : 0;
53 printf("%d %d %d\n", spp00fa
, spp00fca
, spp00fb_r
);
57 spp
[0][0].f
.c
.a
= 555;
58 spp
[0][0].f
.b
[1] = 40;
60 printf("%d %d %d\n", spp00fa
, spp00fca
, spp00fb_r
);
62 printf("%d %d %d %4.5f %d\n", spp
[0][0].e
, spp
[0][0].f
.a
, spp
[0][0].f
.c
.a
,
63 spp
[0][0].f
.b
[1], spp
[0][0].f
.b
== &x
[0] ? 1 : 0);
64 // CHECK: 333 222 777 40.00000 1