This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33542] gfortran does not detect ambigious specific names if they are the same as generic names
- 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: 24 Sep 2007 20:55:25 -0000
- Subject: [Bug fortran/33542] gfortran does not detect ambigious specific names if they are the same as generic names
- References: <bug-33542-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from burnus at gcc dot gnu dot org 2007-09-24 20:55 -------
Re-reading the Fortran standard, I believe now that already "call foo(10)" is
invalid (although it is not ambiguous).
"Two or more accessible entities, other than generic interfaces or
defined operators, may have the same identifier only if the identifier
is not used to refer to an entity in the scoping unit." (Fortran 2003,
"11.2.1 The USE statement and use association")
Thus, unless one claims that using "call foo(10)" refers only to the generic
interface FOO and not to the specific subroutine FOO (i.e. the identifier FOO
and FOO can be distinguished), already the "call foo(10)" is invalid.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33542