testsuite/libgomp.c++/pr49043.C

Go to the documentation of this file.
00001 // PR c++/49043
00002 // { dg-options "-std=c++0x" }
00003 // { dg-do run }
00004 
00005 extern "C" void abort ();
00006 
00007 int
00008 main ()
00009 {
00010   int r = 0;
00011   #pragma omp parallel for reduction (+:r)
00012     for (int a = 0; a < 10; ++a)
00013       {
00014     auto func = [=] () { return a; };
00015     r += func ();
00016       }
00017   if (r != 45)
00018     abort ();
00019 }

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