3 ! Test the fix for PRs93924 & 93925.
5 ! Contributed by Martin Stein <mscfd@gmx.net>
11 integer, target
:: integer_target
14 function classStar_map_ifc(x
) result(y
)
15 class(*), pointer :: y
16 class(*), target
, intent(in
) :: x
17 end function classStar_map_ifc
22 function fun(x
) result(y
)
23 class(*), pointer :: y
24 class(*), target
, intent(in
) :: x
27 integer_target
= x
! Deals with dangling target.
34 function apply(f
, x
) result(y
)
35 procedure(classStar_map_ifc
) :: f
36 integer, intent(in
) :: x
38 class(*), pointer :: p
39 y
= 0 ! Get rid of 'y' undefined warning
47 function selector() result(f
)
48 procedure(classStar_map_ifc
), pointer :: f
61 procedure(classStar_map_ifc
), pointer :: f
64 f
=> selector () ! Fixed by second chunk in patch
65 y
= apply (f
, x
) ! Fixed by first chunk in patch
69 y
= apply (fun
, x
) ! PR93925; fixed as above
72 end program classStar_map