http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60507
--- Comment #3 from janus at gcc dot gnu.org ---
The patch in comment #2 ICEs on this extended test case:
type :: t
procedure(g), pointer, nopass :: ppc => g
end type
procedure(g), pointer :: pp => g
type(t)::x
print *, f(g) ! ok
print *, f(g()) ! illegal
print *, f(pp) ! ok
print *, f(pp()) ! illegal
print *, f(x%ppc) ! ok
print *, f(x%ppc()) ! illegal
contains
real function f(fun)
procedure(g) :: fun
f = fun()
end function
real function g()
g = 1.
end function
end