[Bug fortran/35850] Possibly rejects valid problem with dummy procedure
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Apr 6 21:46:00 GMT 2008
------- 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
More information about the Gcc-bugs
mailing list