3 ! Test the fix for PR81048, where in the second call to 'g2' the
4 ! default initialization was "forgotten". 'g1', 'g1a' and 'g3' check
5 ! that this does not occur for scalars and explicit results.
7 ! Contributed by David Smith <dm577216smith@gmail.com>
14 type(f
), allocatable
:: ans
18 if (ans
%f
.ne
. -1) STOP 1
20 if (ans
%f
.ne
. -1) STOP 2
22 if (ans
%f
.ne
. -1) STOP 3
24 if (ans
%f
.ne
. -1) STOP 4
28 function g3(a
) result(res
)
31 if (res(j
)%f
== -1) then
42 if (g2(j
)%f
== -1) then
52 if (g1
%f
.ne
. -1 ) STOP 7
55 function g1a(a
) result(res
)
57 if (res
%f
.ne
. -1 ) STOP 8