------- Comment #1 from burnus at gcc dot gnu dot org  2008-04-06 21:45 -------
Simplified test case.

gfortran: "external f" -> function or procedure; "call callSub(f)" -> f :=
subroutine. And thus: "call callFunc(f)" => error.

NAG f95 & sunf95: Without the "implicit integer(f)": missmatch real <->
integer.

g95, ifort, openf95: OK, even without the implicit statement.


module m
  implicit none
contains
  subroutine callit(f, n)
    ! implicit integer(f)
    integer :: n
    external f
    if(n == 1) then
      call callSub(f)
    else
      call callFunc(f)
    endif
  end subroutine callit

  subroutine callSub(sub)
    interface
      subroutine sub(a)
      end subroutine sub
    end interface
  end subroutine callSub

  subroutine callFunc(func)
    interface
      integer function func()
      end function func
    end interface
  end subroutine callFunc
end module m


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35850

Reply via email to