https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98141
--- Comment #1 from David Neill Asanza <davidhneill at gmail dot com> --- Here are even shorter examples: $ cat short01.f90 program short01 class(*), allocatable :: a, b, c character(len=0) :: s allocate(a, source=s) !! No problem allocate(character(len=0)::b) allocate(c, source=b) !! Segfault end program $ cat short02.f90 program short02 class(*), allocatable :: a, b allocate(a, source='') !! No problem allocate(b, source=a) !! Segfault end program So it seems the underlying issue is the sourced allocation from a 0-length unlimited polymorphic type.