This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/20896] [4.2 and 4.1 only] ambiguous interface 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: 31 Jan 2007 09:55:11 -0000
- Subject: [Bug fortran/20896] [4.2 and 4.1 only] ambiguous interface not detected
- References: <bug-20896-6642@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from burnus at gcc dot gnu dot org 2007-01-31 09:55 -------
> > http://gcc.gnu.org/ml/gcc-patches/2007-01/msg00145.html
> Do we have consensus yet on this?
> The standard is not exactly straight forward interpret.
I'm not 100% sure. The standard is indeed not very clear about it.
My feeling is that the standard forbids some of the things on the basis that
the compiler is not required to check those, but I should study the patch and
the standard again.
With the patch the following is not ambiguous:
+ SUBROUTINE s2(p2)
+ interface
+ function p2 ()
+ real p2
+ end
+ end interface
+ END
+ SUBROUTINE s1(p1)
+ external p1
+ END
This is based on the following: the first one is a function (well, that's
obvious) and the second one is a subroutine. But is this indeed clear?
Without IMPLICIT NONE the second could be equally well a real function, or do I
miss something subtle?
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at net-b dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20896