3 ! PR 41139: [4.5 Regression] a procedure pointer call as actual argument
5 ! Original test case by Barron Bichon <barron.bichon@swri.org>
6 ! Modified by Janus Weil <janus@gcc.gnu.org>
10 PROCEDURE(add
), POINTER :: f
13 ! Passing the function works
14 g
=greater(4.,add(1.,2.))
15 if (.not
. g
) call abort()
17 ! Passing the procedure pointer fails
19 g
=greater(4.,f(1.,2.))
20 if (.not
. g
) call abort()
24 REAL FUNCTION add(x
,y
)
25 REAL, INTENT(in
) :: x
,y
30 LOGICAL FUNCTION greater(x
,y
)
31 REAL, INTENT(in
) :: x
, y