------- Comment #2 from janus at gcc dot gnu dot org 2009-08-21 13:51 -------
> Beware the forbidden recursive I/Os! This is not the issue here. The following variation has no recursive I/O, but gives the same segfault: PROGRAM test PROCEDURE(add), POINTER :: f logical :: g ! Passing the function works g=greater(4.,add(1.,2.)) print *,g ! Passing the procedure pointer fails f => add g=greater(4.,f(1.,2.)) print *,g CONTAINS REAL FUNCTION add(x,y) REAL, INTENT(in) :: x,y print *,"add:",x,y add = x+y END FUNCTION add LOGICAL FUNCTION greater(x,y) REAL, INTENT(in) :: x, y greater = (x > y) END FUNCTION greater END PROGRAM test -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41139