2 ! { dg-additional-sources proc_ptr_7.c }
5 ! Procedure pointer test
7 ! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
9 program proc_pointer_test
10 use iso_c_binding
, only
: c_int
16 procedure(Integer(c_int
)), pointer :: f
20 procedure(Integer(c_int
)), pointer :: ptr
23 if(ptr() /= 42) STOP 1
26 if(ptr() /= 55) STOP 2
29 if(ptr() /= 65) STOP 3
34 procedure(integer(c_int
)), pointer :: a
40 integer(c_int
) function f55()
44 integer(c_int
) function f65()
47 end program proc_pointer_test