gcc/libgomp/testsuite/libgomp.c++/loop-5.C
Richard Henderson 1799e5d5ca Merge C++ from gomp-20050608-branch.
From-SVN: r111867
2006-03-09 10:14:39 -08:00

20 lines
320 B
C

extern "C" void abort ();
int check;
int f1() { check |= 1; return 1; }
int f2() { check |= 2; return 11; }
int f3() { check |= 4; return 2; }
int a[12];
int main()
{
#pragma omp for
for (int i = f1(); i <= f2(); i += f3())
a[i] = 1;
for (int i = 0; i < 12; ++i)
if (a[i] != (i & 1))
abort ();
}