For whatever it’s worth, I find the above component initialization to be non-conformant to the Fortran standard. The shown initialization violates a constraint and thus the compiler is required to issue a diagnostic. That gfortran does not do so is another bug in that compiler.
C762 (R737) If component-initialization appears, every type parameter and
array bound of the component shall be a colon or constant expression.
C:\Temp>type m.f90
module m
type :: t(n)
integer, len :: n
real :: x(n) = 0.0
end type
end moduleC:\Temp>gfortran -c -Wall m.f90
C:\Temp>