testsuite/libgomp.c/pr49898-1.c

Go to the documentation of this file.
00001 /* PR middle-end/49898 */
00002 /* { dg-do run } */
00003 
00004 extern void abort (void);
00005 
00006 int
00007 main ()
00008 {
00009   int i, j, sum = 0;
00010 #pragma omp parallel
00011   {
00012   #pragma omp for reduction(+:sum)
00013     for (i = 0; i < 10; i++)
00014       {
00015       #pragma omp parallel
00016     {
00017     #pragma omp for reduction(+:sum)
00018       for (j = 0; j < 10; j++)
00019         sum += j;
00020     }
00021       }
00022   }
00023   if (sum != 450)
00024     abort ();
00025   return 0;
00026 }

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