public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/29232]  New: No warning/error for duplicate construct name
@ 2006-09-26  6:53 tobias dot burnus at physik dot fu-berlin dot de
  2006-10-02 11:57 ` [Bug fortran/29232] " fxcoudert at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: tobias dot burnus at physik dot fu-berlin dot de @ 2006-09-26  6:53 UTC (permalink / raw)
  To: gcc-bugs

The code
------------------------
MODULE test
     TYPE vertex
           INTEGER :: k
     END TYPE vertex
CONTAINS
     SUBROUTINE S1()
         TYPE(vertex) :: a
         vertex : DO i=1,2
         ENDDO vertex
     END SUBROUTINE
END MODULE test
------------------------
is invalid Fortran code, but
  gfortran -std=f2003 -c -W -Wall label.f90
accepts it without any error or warning.

Short reasoning (by Richard Main): 
"Both ["type(vertex)", label "vertex:"] are class 1 local identifiers.
Actually, almost everything is a class 1 local identifier.
See the list of them in c16.
You can't have 2 different class 1 entities with the same identifier"

See for the longer discussion:
http://groups.google.com/group/comp.lang.fortran/browse_frm/thread/a869ba11f828f208/6b95093a4a9bf34a#6b95093a4a9bf34a


-- 
           Summary: No warning/error for duplicate construct name
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tobias dot burnus at physik dot fu-berlin dot de


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


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

end of thread, other threads:[~2006-11-06 17:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-26  6:53 [Bug fortran/29232] New: No warning/error for duplicate construct name tobias dot burnus at physik dot fu-berlin dot de
2006-10-02 11:57 ` [Bug fortran/29232] " fxcoudert at gcc dot gnu dot org
2006-10-03 14:38 ` pault at gcc dot gnu dot org
2006-10-13 12:52 ` pault at gcc dot gnu dot org
2006-10-14  8:19 ` pault at gcc dot gnu dot org
2006-11-06 17:19 ` pault at gcc dot gnu dot 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).