This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/39996] New: Double typing of function results not detected
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 May 2009 19:26:31 -0000
- Subject: [Bug fortran/39996] New: Double typing of function results not detected
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Found at c.l.f where Giorgio Pastore reported it.
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/a48b6b038baabd90
gfortran -std=f95 does not detect the following:
interface
function square (x) result (s)
real,intent (in) ::x
real ::s
end function square
end interface
real :: square ! <<<<<<<<<< Wrong!
ifort prints:
error #6409: This name has already been used as an external procedure name.
[SQUARE]
real :: square
And NAG f95:
Error: hjff.f90, line 24: Multiply defined symbol SQUARE
detected at ::@SQUARE
Error: hjff.f90, line 24: Duplicate type declaration for SQUARE
detected at ::@SQUARE
--
Summary: Double typing of function results not detected
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39996