testsuite/libgomp.c++/loop-5.C

Go to the documentation of this file.
00001 extern "C" void abort ();
00002 
00003 int check;
00004 int f1() { check |= 1; return 1; }
00005 int f2() { check |= 2; return 11; }
00006 int f3() { check |= 4; return 2; }
00007 
00008 int a[12];
00009 
00010 int main()
00011 {
00012   #pragma omp for
00013   for (int i = f1(); i <= f2(); i += f3())
00014     a[i] = 1;
00015 
00016   for (int i = 0; i < 12; ++i)
00017     if (a[i] != (i & 1))
00018       abort ();
00019 }

Generated on Fri Apr 5 05:38:10 2013 for Libgomp by  doxygen 1.4.7