/gcc/testsuite/gcc.dg/gomp/for-13.c

https://gitlab.com/sortix/gcc · C · 18 lines · 8 code · 4 blank · 6 comment · 2 complexity · 4157d172dbb3894d5157c8d78d7dc222 MD5 · raw file

  1. // At one point in development, a typo disabled the remapping of the
  2. // for iteration variable as private.
  3. // { dg-do compile }
  4. // { dg-options "-fopenmp -fdump-tree-ompexp" }
  5. extern void bar(int);
  6. void foo(void)
  7. {
  8. int i;
  9. #pragma omp parallel for default(none)
  10. for (i = 0; i < 10; i++)
  11. bar(i);
  12. }
  13. // { dg-final { scan-tree-dump-times "omp_data_o" 0 "ompexp" } }
  14. // { dg-final { cleanup-tree-dump "ompexp" } }