testsuite/libgomp.c/pr43893.c

Go to the documentation of this file.
00001 /* PR c/43893 */
00002 /* { dg-do run } */
00003 
00004 extern void abort (void);
00005 
00006 int
00007 main ()
00008 {
00009   int c;
00010   unsigned int i;
00011   int j;
00012   c = 0;
00013 #pragma omp parallel for reduction(+:c)
00014   for (i = 0; i < 1; i++)
00015     c++;
00016   if (c != 1)
00017     abort ();
00018   c = 0;
00019 #pragma omp parallel for reduction(+:c)
00020   for (i = 0; i <= 0; i++)
00021     c++;
00022   if (c != 1)
00023     abort ();
00024   c = 0;
00025 #pragma omp parallel for reduction(+:c)
00026   for (j = - __INT_MAX__ - 1; j < - __INT_MAX__; j++)
00027     c++;
00028   if (c != 1)
00029     abort ();
00030   c = 0;
00031 #pragma omp parallel for reduction(+:c)
00032   for (j = - __INT_MAX__ - 1; j <= - __INT_MAX__ - 1; j++)
00033     c++;
00034   if (c != 1)
00035     abort ();
00036   c = 0;
00037 #pragma omp parallel for reduction(+:c)
00038   for (i = 2U * __INT_MAX__ + 1; i > 2U * __INT_MAX__; i--)
00039     c++;
00040   if (c != 1)
00041     abort ();
00042   c = 0;
00043 #pragma omp parallel for reduction(+:c)
00044   for (i = 2U * __INT_MAX__ + 1; i >= 2U * __INT_MAX__ + 1; i--)
00045     c++;
00046   if (c != 1)
00047     abort ();
00048   c = 0;
00049 #pragma omp parallel for reduction(+:c)
00050   for (j = __INT_MAX__; j > __INT_MAX__ - 1; j--)
00051     c++;
00052   if (c != 1)
00053     abort ();
00054   c = 0;
00055 #pragma omp parallel for reduction(+:c)
00056   for (j = __INT_MAX__; j >= __INT_MAX__; j--)
00057     c++;
00058   if (c != 1)
00059     abort ();
00060   return 0;
00061 }

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