Polymorphic array in a derived type

Did you try this simple case? If I recall correctly, gfortran - for which a lot of such support started with the Fortran 2003 standard revision - does not fully support what is essentially a Fortran 2008 feature that is allocatable component of a recursive type (including polymorphic):

   type :: t
      class(t), allocatable :: a
   end type
end