Rebase.
[official-gcc.git] / libgomp / testsuite / libgomp.c / target-8.c
blob350845753244b4f7372050b1a6f804b84617eaa5
1 /* { dg-do run } */
2 /* { dg-options "-fopenmp" } */
4 void
5 foo (int *p)
7 int i;
8 #pragma omp parallel
9 #pragma omp single
10 #pragma omp target teams distribute parallel for map(p[0:24])
11 for (i = 0; i < 24; i++)
12 p[i] = p[i] + 1;
15 int
16 main ()
18 int p[24], i;
19 for (i = 0; i < 24; i++)
20 p[i] = i;
21 foo (p);
22 for (i = 0; i < 24; i++)
23 if (p[i] != i + 1)
24 __builtin_abort ();
25 return 0;