2 ! This testcase tests c_funloc and c_funptr from iso_c_binding. It uses
3 ! functions defined in c_funloc_tests_3_funcs.c.
4 module c_funloc_tests_3
7 function ffunc(j) bind(c)
8 use iso_c_binding, only: c_funptr, c_int
9 integer(c_int) :: ffunc
10 integer(c_int), value :: j
13 end module c_funloc_tests_3
15 use iso_c_binding, only: c_funptr, c_funloc
16 use c_funloc_tests_3, only: ffunc
19 function returnFunc() bind(c,name="returnFunc")
20 use iso_c_binding, only: c_funptr
21 type(c_funptr) :: returnFunc
22 end function returnFunc
23 subroutine callFunc(func,pass,compare) bind(c,name="callFunc")
24 use iso_c_binding, only: c_funptr, c_int
25 type(c_funptr), value :: func
26 integer(c_int), value :: pass,compare
27 end subroutine callFunc
31 call callFunc(p, 13,3*13)
33 call callFunc(p, 21,-17*21)
35 ! { dg-final { cleanup-modules "c_funloc_tests_3" } }