Have you considered OPTIONAL attribute? Depending on what you’re trying to do, that may simplify your code considerably.
module my_mod
implicit none
abstract interface
real function Ifunc(x, y)
implicit none !<-- Don't forget this; INTERFACE body doesn't inherit IMPLICT statements from host scope
real, intent(in) :: x
real, intent(in), optional :: y
end function
end interface
contains
subroutine sub(my_fun, ..)
procedure(Ifunc) :: my_fun
..
end subroutine sub
end module my_mod