2 ! Tests the fix for PR42104 in which the call to the procedure pointer
3 ! component caused an ICE because the "always_implicit flag was not used
4 ! to force the passing of a descriptor for the array argument.
6 ! Contributed by Martien Hulsen <m.a.hulsen@tue.nl>
8 module poisson_functions_m
14 function func ( nr
, x
)
15 integer, intent(in
) :: nr
16 real, intent(in
), dimension(:) :: x
29 func
= 1 + cos(pi
*x(1))*cos(pi
*x(2))
31 write(*,'(/a,i0/)') 'Error func: wrong function number: ', nr
37 end module poisson_functions_m
44 function dummyfunc ( nr
, x
)
45 integer, intent(in
) :: nr
46 real, intent(in
), dimension(:) :: x
48 end function dummyfunc
52 procedure(dummyfunc
), nopass
, pointer :: p
=> null()
55 end module element_defs_m
59 use poisson_functions_m
62 procedure(dummyfunc
), pointer :: p
=> null()
63 type(function_p
) :: funcp
68 print *, func(nr
=3,x
=(/0.1,0.1/))
69 print *, p(nr
=3,x
=(/0.1,0.1/))
70 print *, funcp
%p(nr
=3,x
=(/0.1,0.1/))