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

Go to the documentation of this file.
00001 extern "C" void abort (void);
00002 int a;
00003 
00004 void
00005 foo ()
00006 {
00007   int i;
00008   a = 30;
00009 #pragma omp barrier
00010 #pragma omp for lastprivate (a)
00011   for (i = 0; i < 1024; i++)
00012     {
00013       a = i;
00014     }
00015   if (a != 1023)
00016     abort ();
00017 }
00018 
00019 int
00020 main (void)
00021 {
00022 #pragma omp parallel num_threads (64)
00023   foo ();
00024 
00025   return 0;
00026 }

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