public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/47136] New: [OOP] possible name resolution problems between MODULE and INTERFACE?
@ 2010-12-31 20:01 dfranke at gcc dot gnu.org
  2011-01-01 10:58 ` [Bug fortran/47136] " janus at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: dfranke at gcc dot gnu.org @ 2010-12-31 20:01 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47136

           Summary: [OOP] possible name resolution problems between MODULE
                    and INTERFACE?
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dfranke@gcc.gnu.org
                CC: janus@gcc.gnu.org


In the snippet below, I believe that "ABSTRACT INTERFACE s" of "MODULE a" and
the "MODULE s" interfere with each other in an unholy way. If either is
renamed, the error goes away.

As I can not see why duplicate names like these should be invalid, I'd assume
the code as-is to be valid?!


MODULE a
  ABSTRACT INTERFACE
    SUBROUTINE s()
    END SUBROUTINE
  END INTERFACE

  TYPE, ABSTRACT :: t
  CONTAINS
    PROCEDURE(s), DEFERRED, NOPASS :: pp
  END TYPE
END MODULE

MODULE s
  USE a
END MODULE


$ gfortran-svn -c iface.f90
iface.f90:17.7:

  USE a
       1
Error: 's' must be a module procedure or an external procedure with an explicit
interface at (1)

$ gfortran-svn -v
gcc version 4.6.0 20101230 (experimental) (GCC) 

Same for
$ gfortran-4.5 -v
gcc version 4.5.3 20101230 (prerelease) (GCC)


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-01-10 15:03 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-31 20:01 [Bug fortran/47136] New: [OOP] possible name resolution problems between MODULE and INTERFACE? dfranke at gcc dot gnu.org
2011-01-01 10:58 ` [Bug fortran/47136] " janus at gcc dot gnu.org
2011-01-02 13:25 ` janus at gcc dot gnu.org
2011-01-02 13:34 ` janus at gcc dot gnu.org
2011-01-02 13:47 ` dfranke at gcc dot gnu.org
2011-01-02 14:46 ` janus at gcc dot gnu.org
2011-01-02 15:19 ` janus at gcc dot gnu.org
2011-01-02 15:21 ` janus at gcc dot gnu.org
2011-01-02 15:24 ` [Bug fortran/47136] local identifier shall not be the same as a global identifier janus at gcc dot gnu.org
2011-01-09 18:25 ` janus at gcc dot gnu.org
2013-01-07 22:22 ` mikael at gcc dot gnu.org
2013-01-10 15:03 ` mikael at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).