force-parallel-1.c 631 B

1234567891011121314151617181920212223242526272829303132
  1. void abort (void);
  2. int x[10000000];
  3. void parloop (int N)
  4. {
  5. int i;
  6. for (i = 0; i < N; i++)
  7. x[i] = i + 3;
  8. for (i = 0; i < N; i++)
  9. {
  10. if (x[i] != i + 3)
  11. abort ();
  12. }
  13. }
  14. int main(void)
  15. {
  16. parloop(10000000);
  17. return 0;
  18. }
  19. /* Check that parallel code generation part make the right answer. */
  20. /* { dg-final { scan-tree-dump-times "1 loops carried no dependency" 1 "graphite" } } */
  21. /* { dg-final { cleanup-tree-dump "graphite" } } */
  22. /* { dg-final { scan-tree-dump-times "loopfn" 4 "optimized" } } */
  23. /* { dg-final { cleanup-tree-dump "parloops" } } */
  24. /* { dg-final { cleanup-tree-dump "optimized" } } */