[Bug fortran/20896] [4.2 and 4.1 only] ambiguous interface not detected
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Jan 31 09:55:00 GMT 2007
------- 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
More information about the Gcc-bugs
mailing list