include/
[official-gcc.git] / libgomp / testsuite / libgomp.c / loop-3.c
blobf0f9b4705f91bf651fd4c5797c73da42c222ba18
1 /* { dg-do run } */
3 extern void abort (void);
5 volatile int count;
6 static int test(void)
8 return ++count > 0;
11 int i;
13 int main()
15 #pragma omp for lastprivate (i)
16 for (i = 0; i < 10; ++i)
18 if (test())
19 continue;
20 abort ();
22 if (i != count)
23 abort ();
24 return 0;