module exception_callback
  public :: f_err_set_callback
contains
  subroutine f_err_set_callback(callback)
    external :: callback
  end subroutine f_err_set_callback
end module exception_callback

module set_callback
   use exception_callback
   private
   public :: f_err_set_callback
end module set_callback

module main
  interface
     subroutine init()
       use set_callback
     end subroutine init
  end interface
end module main

end
