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

            Bug ID: 64355
           Summary: ICE (segfault) in gfc_zero_size_array with
                    -fcoarray=single
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org

The following program ICEs (segfaults) in
  0x607cbb gfc_zero_size_array
          ../../gcc/fortran/arith.c:1637
when compiled with gfortran -fcoarray=single



module m
type t
   integer, allocatable :: a(:)
end type t
end module m

program main
  use m
  type(t), save :: caf[*]

  interface
    subroutine sub1(x)
      import :: t
      type(t) :: x[*]
    end subroutine sub1
  end interface

  call sub1(caf)
end program main


subroutine sub1(x)
  use m
  type(t) :: x[*]
end subroutine sub1

Reply via email to