https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82970
--- Comment #1 from G. Steinmetz <gs...@t-online.de> --- This variant compiles, of course : $ cat z3.f90 program p type t end type class(t), allocatable :: x(:)[:] class(t), allocatable :: z(:) allocate (x(2)[*]) allocate (z, source=x) end