! Declare an interface module iface abstract interface function foo(arg1) result(res) real, intent(in) :: arg1 double precision :: res end function foo end interface end module iface ! Implement the interface module impl contains function impl_foo(arg1) result(res) real, intent(in) :: arg1 double precision :: res res = dble(arg1) end function impl_foo end module impl module test use :: iface interface generic_name_get_proc_ptr module procedure specific_name_get_proc_ptr end interface contains function specific_name_get_proc_ptr() result(res) use :: impl procedure(foo), pointer :: res res => impl_foo end function specific_name_get_proc_ptr end module test program crash_test use :: test procedure(foo), pointer :: ptr ptr => specific_name_get_proc_ptr() ! OK ptr => generic_name_get_proc_ptr() ! KO end program crash_test