[Bug fortran/39997] Procedure(), pointer & implicit typing: rejects-valid / accepts-invalid?
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri May 15 10:32:00 GMT 2009
------- Comment #3 from burnus at gcc dot gnu dot org 2009-05-15 10:32 -------
Proc-pointer fun as written by Malcolm Cohen,
http://j3-fortran.org/pipermail/j3/2009-May/002755.html
If I understood his arguments correctly, even the following Fortran 90 program
might be affected:
module m
IMPLICIT logical(1)(A-Z)
external proc
end module m
program test
use m
implicit none ! << optionally remove this line
logical(1) :: x
x = proc()
end program test
It currently fails with ifort, NAG f95, sunf95, openf95, pathf95, pgf95, and
gfortran. (g95 seeming properly accepts it - and rejects it if one changes the
IMPLICIT logical to something incompatible.)
* * *
Otherwise, the example proposed by Richard is invalid. (I think that is line
with current gfortran.)
* * *
Regarding
implicit none
PROCEDURE(REAL) :: func
PROCEDURE(), POINTER :: ptr
ptr => func
that seems to be invalid and thus is needs to be rejected, but I think it is
currently accepted.
(Please follow the thread and check also the final outcome of the
interpretation request.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39997
More information about the Gcc-bugs
mailing list