2 ! Test that the arg checking for c_funloc verifies the procedures are
4 module c_funloc_tests_5
5 use, intrinsic :: iso_c_binding, only: c_funloc, c_funptr
7 subroutine sub0() bind(c)
8 type(c_funptr) :: my_c_funptr
10 my_c_funptr = c_funloc(sub1) ! { dg-error "must be BIND.C." }
12 my_c_funptr = c_funloc(func0) ! { dg-error "must be BIND.C." }
18 function func0(desired_retval)
19 use, intrinsic :: iso_c_binding, only: c_int
20 integer(c_int), value :: desired_retval
21 integer(c_int) :: func0
22 func0 = desired_retval
24 end module c_funloc_tests_5