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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |needs-stdcheck

--- Comment #8 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(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.

Reply via email to