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

Go to the documentation of this file.
00001 // PR c++/24502
00002 // { dg-do run }
00003 
00004 extern "C" void abort ();
00005 
00006 template <typename T> T
00007 foo (T r)
00008 {
00009   T i;
00010 #pragma omp for
00011   for (i = 0; i < 10; i++)
00012     r += i;
00013   return r;
00014 }
00015 
00016 int
00017 main ()
00018 {
00019   if (foo (0) != 10 * 9 / 2 || foo (2L) != 10L * 9 / 2 + 2)
00020     abort ();
00021   return 0;
00022 }

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