Description
Consider the following code
type base
real :: r1
end type
type (base), allocatable :: b1(:)
type (base) :: b2 (10)
b2 = base(10.0)
allocate (b1(5), source=(/(b2(j),j=10,6)/)) !<-- this is illegal
end
The shape of the SOURCE=
expr is 0 while the shape of the allocate object is 5
.
It is not conforming to the standard. All ifort, gfortran and XLF issues an error.
Is this an intentional extension for Flang?