00001 void abort (void); 00002 00003 void parloop (int N) 00004 { 00005 int i; 00006 int x[10000000]; 00007 00008 for (i = 0; i < N; i++) 00009 x[i] = i + 3; 00010 00011 for (i = 0; i < N; i++) 00012 { 00013 if (x[i] != i + 3) 00014 abort (); 00015 } 00016 } 00017 00018 int main(void) 00019 { 00020 parloop(10000000); 00021 00022 return 0; 00023 } 00024 00025 /* Check that parallel code generation part make the right answer. */ 00026 /* { dg-final { scan-tree-dump-times "1 loops carried no dependency" 2 "graphite" } } */ 00027 /* { dg-final { cleanup-tree-dump "graphite" } } */ 00028 /* { dg-final { scan-tree-dump-times "loopfn" 5 "optimized" } } */ 00029 /* { dg-final { cleanup-tree-dump "parloops" } } */ 00030 /* { dg-final { cleanup-tree-dump "optimized" } } */