https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78641
Bug ID: 78641 Summary: [OOP] ICE on polymorphic allocatable function in array constructor Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: damian at sourceryinstitute dot org Target Milestone: --- gfortran 6.2.0 and 7.0.0 20161127 report an internal compiler error when an allocatable polymorphic function appears in an array constructor: $ cat alloc-func-in-array-const.f90 implicit none type foo end type type(foo) :: bar(1) bar = [f()] contains function f() result(foobar) class(foo), allocatable :: foobar allocate(foobar,source = foo()) end function end program $ gfortran alloc-func-in-array-const.f90 f951: internal compiler error: Segmentation fault: 11 f951: internal compiler error: Abort trap: 6 gfortran: internal compiler error: Abort trap: 6 (program f951)