2 module c_funloc_tests_2
3 use, intrinsic :: iso_c_binding, only: c_funptr, c_funloc
7 subroutine sub0() bind(c)
8 type(c_funptr) :: my_c_funptr
9 integer :: my_local_variable
11 my_c_funptr = c_funloc() ! { dg-error "Missing argument" }
12 my_c_funptr = c_funloc(sub0)
13 my_c_funptr = c_funloc(sub0, sub0) ! { dg-error "More actual than formal" }
14 my_c_funptr = c_funloc(my_local_variable) ! { dg-error "must be a procedure" }
16 end module c_funloc_tests_2