1 extern "C" void abort (void);
2 union U { int x; long long y; };
3 struct T { int a; union U b; int c; };
4 struct S { int s; int u; T v; int x[10]; union U w; int y[10]; int z[10]; };
24 #pragma omp target map (to:s.template v.template b, s.u, s.x[0:z + 2]) \
25 map (tofrom:s.y[3:3]) \
26 map (from: s.w, s.template z[z + 1:z + 3], err)
29 if (s.u != 1 || s.v.b.y != 3LL || s.x[0] != 7 || s.x[1] != 8
30 || s.y[3] != 9 || s.y[4] != 10 || s.y[5] != 11)
40 if (err || s.w.x != 6 || s.y[3] != 12 || s.y[4] != 13 || s.y[5] != 14
41 || s.z[1] != 15 || s.z[2] != 16 || s.z[3] != 17)
49 #pragma omp target data map (tofrom: s)
50 #pragma omp target map (always to: s.template w, s.x[1], err) map (alloc:s.u, s. template v.template b, s.z[z:z + 1])
53 if (s.u != 2 || s.v.b.y != 4LL || s.w.x != 7 || s.x[1] != 18 || s.z[0] != 19)
59 if (err || s.w.x != 8 || s.x[1] != 20 || s.z[0] != 21)
67 #pragma omp target data map (from: s.w, s.x[0:2]) map (to: s.v.b, s.u)
68 #pragma omp target map (always to: s.w, s.x[0:2], err) map (alloc:s.u, s.v.b)
71 if (s.u != 3 || s.v.b.y != 5LL || s.w.x != 9 || s.x[0] != 22 || s.x[1] != 23)
77 if (err || s.w.x != 11 || s.x[0] != 24 || s.x[1] != 25)
97 #pragma omp target map (to:s.v.b, s.u, s.x[0:z + 2]) \
98 map (tofrom:s.y[3:3]) \
99 map (from: s.w, s.z[z + 1:z + 3], err)
102 if (s.u != 1 || s.v.b.y != 3LL || s.x[0] != 7 || s.x[1] != 8
103 || s.y[3] != 9 || s.y[4] != 10 || s.y[5] != 11)
113 if (err || s.w.x != 6 || s.y[3] != 12 || s.y[4] != 13 || s.y[5] != 14
114 || s.z[1] != 15 || s.z[2] != 16 || s.z[3] != 17)
122 #pragma omp target data map (tofrom: s)
123 #pragma omp target map (always to: s.w, s.x[1], err) map (alloc:s.u, s.v.b, s.z[z:z + 1])
126 if (s.u != 2 || s.v.b.y != 4LL || s.w.x != 7 || s.x[1] != 18 || s.z[0] != 19)
132 if (err || s.w.x != 8 || s.x[1] != 20 || s.z[0] != 21)
140 #pragma omp target data map (from: s.w, s.x[0:2]) map (to: s.v.b, s.u)
141 #pragma omp target map (always to: s.w, s.x[0:2], err) map (alloc:s.u, s.v.b)
144 if (s.u != 3 || s.v.b.y != 5LL || s.w.x != 9 || s.x[0] != 22 || s.x[1] != 23)
150 if (err || s.w.x != 11 || s.x[0] != 24 || s.x[1] != 25)