1! { dg-do compile }
2!
3! Contributed by James van Buskirk
4!
5! http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/44d572766bce0e6f/
6
7  use iso_c_binding
8  implicit none
9
10  abstract interface
11    subroutine all_subs(x,y) bind(C)
12      use iso_c_binding
13      real(c_float) :: x,y
14    end subroutine all_subs
15  end  interface
16
17  procedure(all_subs) :: sub
18  type(C_FUNPTR) :: s
19
20  s = c_funloc (sub)
21
22end
23