12 integer, allocatable
:: i(:)
14 real, allocatable
:: x(:)
15 type(mytype
), pointer :: t
20 allocate(i(4), source
=n
)
21 if (any(i
/= 42)) STOP 1
23 allocate(x(4), source
=z
)
24 if (any(x
/= 99.)) STOP 2
26 allocate(t
, source
=mytype(1.0,2))
27 if (t
%r
/= 1. .or
. t
%i
/= 2) STOP 3
30 allocate(i(3), source
=(/1, 2, 3/))
31 if (i(1) /= 1 .or
. i(2) /= 2 .or
. i(3) /= 3) STOP 4
38 integer, intent(in
) :: j(*)
39 integer, allocatable
:: k(:)
40 allocate(k(2), source
=j(1:2))
41 if (k(1) /= 1 .or
. k(2) /= 2) STOP 5