PR target/77349
[official-gcc.git] / libgomp / testsuite / libgomp.c / target-8.c
blob5fe0db957950087cc0f66b90a5ddb1d87c4d9ecc
1 /* { dg-do run } */
3 void
4 foo (int *p)
6 int i;
7 #pragma omp parallel
8 #pragma omp single
9 #pragma omp target teams distribute parallel for map(p[0:24])
10 for (i = 0; i < 24; i++)
11 p[i] = p[i] + 1;
14 int
15 main ()
17 int p[24], i;
18 for (i = 0; i < 24; i++)
19 p[i] = i;
20 foo (p);
21 for (i = 0; i < 24; i++)
22 if (p[i] != i + 1)
23 __builtin_abort ();
24 return 0;