pr32359.f90 658 B

1234567891011121314151617181920212223242526272829303132333435
  1. ! { dg-do compile }
  2. !
  3. ! PR fortran/32359
  4. ! Contributed by Bill Long <longb@cray.com>
  5. subroutine test
  6. use omp_lib
  7. implicit none
  8. integer, parameter :: NT = 4
  9. integer :: a
  10. save
  11. !$omp threadprivate(a)
  12. a = 1
  13. !$ call omp_set_num_threads(NT)
  14. !$omp parallel
  15. print *, omp_get_thread_num(), a
  16. !$omp end parallel
  17. end subroutine test
  18. ! Derived from OpenMP test omp1/F2_6_2_8_5i.f90
  19. use omp_lib
  20. implicit none
  21. integer, parameter :: NT = 4
  22. integer :: a = 1
  23. !$omp threadprivate(a)
  24. !$ call omp_set_num_threads(NT)
  25. !$omp parallel
  26. print *, omp_get_thread_num(), a
  27. !$omp end parallel
  28. END