Retro68/gcc/libgomp/testsuite/libgomp.c/omp-loop03.c
Wolfgang Thaller aaf905ce07 add gcc 4.70
2012-03-28 01:13:14 +02:00

27 lines
288 B
C

extern void abort (void);
int a;
void
foo ()
{
int i;
a = 30;
#pragma omp barrier
#pragma omp for lastprivate (a)
for (i = 0; i < 1024; i++)
{
a = i;
}
if (a != 1023)
abort ();
}
int
main (void)
{
#pragma omp parallel num_threads (64)
foo ();
return 0;
}