https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115401
anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2024-06-09 Ever confirmed|0 |1 Keywords| |ice-on-valid-code Status|UNCONFIRMED |NEW --- Comment #1 from anlauf at gcc dot gnu.org --- Reduced testcase which ICEs here: module m implicit none type :: t1 integer :: a end type contains function copy(a) result(ty) class(t1), allocatable :: ty(:) integer, intent(in) :: a allocate(t1::ty(a)) ty%a = 1 end function subroutine test() ! class(t1), allocatable :: up(:) ! OK class(*), allocatable :: up(:) ! ICE allocate(up(10), source=copy(10)) end subroutine end module