testsuite/libgomp.c/pr46886.c

Go to the documentation of this file.
00001 /* { dg-do run } */
00002 /* { dg-options "-O -ftree-parallelize-loops=4 -fno-tree-ch -fno-tree-dominator-opts" } */
00003 
00004 void abort(void);
00005 
00006 int d[1024], e[1024];
00007 
00008 int foo (void)
00009 {
00010   int s = 0;
00011   int i;
00012   for (i = 0; i < 1024; i++)
00013     s += d[i] - e[i];
00014   return s;
00015 }
00016 
00017 int main ()
00018 {
00019   int i;
00020   for (i = 0; i < 1024; i++)
00021     {
00022       d[i] = i * 2;
00023       e[i] = i;
00024     }
00025   if (foo () != 1023 * 1024 / 2)
00026     abort ();
00027   return 0;
00028 }

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