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(:,:)
21 if (p%a /= 3) call abort()
22 if (any(q(:,:)%a /= 3)) call abort()
24 allocate(z%p2, z%p(2:3))
25 if (z%p2%a /= 3) call abort()
26 if (any(z%p(:)%a /= 3)) call abort()
28 allocate(x(1)%p2, x(1)%p(2))
29 if (x(1)%p2%a /= 3) call abort()
30 if (any(x(1)%p(:)%a /= 3)) call abort()