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

            Bug ID: 125529
           Summary: ICE (segfault) in DO CONCURRENT with DEFAULT(NONE) and
                    ASSOCIATE
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jvdelisle at gcc dot gnu.org
  Target Milestone: ---

gfortran segfaults when a DO CONCURRENT construct uses inline type-spec
iterators and DEFAULT(NONE) and the body contains an ASSOCIATE construct.

  subroutine test (a, b)
    implicit none
    integer, intent(in)  :: a(10,10)
    integer, intent(out) :: b(10,10)
    do concurrent (integer :: i = 1:10, j = 1:10) &
        default(none) shared(a, b)
      associate (tmp => a(i,j))
        b(i,j) = tmp + 1
      end associate
    end do
  end subroutine

  $ gfortran -std=f2018 -c do_concurrent_assoc_default_none.f90

  gfortran segfaults.  The code should compile cleanly.

Reply via email to