https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66927
Bug ID: 66927 Summary: [6.0 regression] ICE in gfc_conf_procedure_call Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: juergen.reuter at desy dot de Target Milestone: --- An ICE happens when trying to allocate an allocatable array with explicit array bounds in combination with a source expression: gfortran -c processes.f90 processes.f90:31:0: source = t3%int_born%func ()) 1 internal compiler error: in gfc_conv_procedure_call, at fortran/trans-expr.c:5754 processes.f90:31:0: internal compiler error: Abort trap: 6 with the following code (maybe can be reduced even a little further): module processes implicit none private type :: t1_t real :: p = 0.0 end type t1_t type :: t2_t private type(t1_t), dimension(:), allocatable :: p contains procedure :: func => t2_func end type t2_t type :: t3_t type(t2_t), public :: int_born end type t3_t contains function t2_func (int) result (p) class(t2_t), intent(in) :: int type(t1_t), dimension(:), allocatable :: p end function t2_func subroutine evaluate (t3) class(t3_t), intent(inout) :: t3 type(t1_t), dimension(:), allocatable :: p_born allocate (p_born(1:size(t3%int_born%func ())), & source = t3%int_born%func ()) end subroutine evaluate end module processes