1 // RUN: %libomptarget-compile-run-and-check-generic
2 // UNSUPPORTED: amdgcn-amd-amdhsa
8 int data1
[3] = {1, 2, 5};
9 int data2
[3] = {10, 20, 50};
10 int data3
[3] = {100, 200, 500};
13 for (int i
=0; i
<16; i
++) sum
[i
] = 10000;
15 #pragma omp target teams distribute parallel for map(tofrom : sum[:16]) \
16 firstprivate(data1, data2, data3)
17 for (int i
= 0; i
< 16; ++i
) {
18 for (int j
= 0; j
< 3; ++j
) {
26 for (int i
= 0; i
< 16; ++i
) {
27 if (sum
[i
] != 10888) {
29 printf("ERROR: The sum for index %d is %d\n", i
, sum
[i
]);
30 printf("ERROR: data1 = {%d, %d, %d}\n", data1
[0], data1
[1], data1
[2]);
31 printf("ERROR: data2 = {%d, %d, %d}\n", data2
[0], data2
[1], data2
[2]);
32 printf("ERROR: data3 = {%d, %d, %d}\n", data3
[0], data3
[1], data3
[2]);