3 ! Test the fix for PR29216 in which function results did not
4 ! get default initialization.
5 ! Contributed by Stephan Kramer <stephan.kramer@imperial.ac.uk>
8 integer, pointer:: p
=> null ()
12 if (associated(x
%p
) .or
. x
%i
/= 3) STOP 1
14 if (associated(x
%p
) .or
. x
%i
/= 3) STOP 2
16 if (associated(x
%p
) .or
. x
%i
/= 3) STOP 3
18 function f() result (fr
)
20 if (associated(fr
%p
) .or
. fr
%i
/= 3) STOP 4
24 if (associated(g
%p
) .or
. g
%i
/= 3) STOP 5