https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78298

Harald Anlauf <anlauf at gmx dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anlauf at gmx dot de

--- Comment #2 from Harald Anlauf <anlauf at gmx dot de> ---
Fusing the outer $omp parallel / $omp do makes the code compile, e.g.:

program p
  implicit none
  integer :: i, j, n
  n = 2
!  !$omp parallel
!  !$omp do
  !$omp parallel do
  do i = 1, n
     !$omp parallel
     !$omp do
     do j = 1, n
        call sub(i)
     end do
     !$omp end parallel
  end do
!  !$omp end parallel
  !$omp end parallel do
  !call unused()
contains
  subroutine sub(x)
    integer :: x
  end subroutine sub
  subroutine unused()
    i = 0
    j = 0
  end
end program p


The differences in the dump-tree may be revealing to sb. understanding
the parsing of OpenMP constructs.

Reply via email to