reference2.f90 401 B

12345678910111213141516171819202122
  1. ! { dg-do run }
  2. real, dimension (5) :: b
  3. b = 5
  4. call foo (b)
  5. contains
  6. subroutine foo (a)
  7. real, dimension (5) :: a
  8. logical :: l
  9. l = .false.
  10. !$omp parallel private (a) reduction (.or.:l)
  11. a = 15
  12. l = bar (a)
  13. !$omp end parallel
  14. if (l) call abort
  15. end subroutine
  16. function bar (a)
  17. real, dimension (5) :: a
  18. logical :: bar
  19. bar = any (a .ne. 15)
  20. end function
  21. end