2 ! Check that allocatable/pointer variables of derived types with initialized
3 ! components are are initialized when allocated
12 type(t
), pointer :: p(:)
13 type(t
), pointer :: p2
16 type(t
), allocatable
:: q(:,:)
22 if (any(q(:,:)%a
/= 3)) STOP 2
24 allocate(z
%p2
, z
%p(2:3))
25 if (z
%p2
%a
/= 3) STOP 3
26 if (any(z
%p(:)%a
/= 3)) STOP 4
28 allocate(x(1)%p2
, x(1)%p(2))
29 if (x(1)%p2
%a
/= 3) STOP 5
30 if (any(x(1)%p(:)%a
/= 3)) STOP 6