https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57711

--- Comment #9 from anlauf at gcc dot gnu.org ---
(In reply to Thomas Koenig from comment #8)
> (In reply to Tobias Burnus from comment #6)
> > Patch for PR40276 and this PR:
> > http://gcc.gnu.org/ml/fortran/2013-06/msg00132.html (approved).
> > 
> > It fails for the test case
> > http://gcc.gnu.org/ml/fortran/2013-07/msg00017.html (-> PR39290 and
> > PR20896). In that test case, "s1" and "s2" are ambiguous in F2003/F2008.
> > 
> > However, I fear that the check in the patch above will give a bogus error 
> > for
> >   interface gen
> >     subroutine s1(x)
> >       real, external :: x
> >     end subroutine s1
> >     subroutine s1(x)
> >       integer, external :: x
> >     end subroutine s1
> >   end interface
> > which is valid since F2008 ("both data objects or known to be functions, and
> > neither is TKR compatible with the other,", 12.4.3.4.5). The issue does not
> > occur yet, as the feature is not yet implemented.
> 
> Is this really valid?  As I see it, s1 is global, and thus cannot be
> declared twice.

No, it is just the conflict of the two procedures s1 which could be defined
in the module where this interface is declared.

And we already detect this conflict reasonably.
As do Intel and NAG.

Reply via email to