! F95: 14.1.2.1:
! "A common block name in a scoping unit also may be the name of any local
!  entity other than a named constant, intrinsic procedure, or a local variable
!  that is also an external function in a function subprogram."
!
! F2003: 16.2.1
! "A name that identifies a common block in a scoping unit shall not be used
!  to identify a constant or an intrinsic procedure in that scoping unit. If
!  a local identifier is also the name of a common block, the appearance of
!  that name in any context other than as a common block name in a COMMON
!  or SAVE statement is an appearance of the local identifier."

Currently, valid Fortran 2003 programs are therefore rejected. The check
happens very early in the match.c's gfc_match_common ("Symbol '%s' at %C is
already an external symbol that is not COMMON").


-- 
           Summary: F2003: Reject COMMON block names if local symbol already
                    exists
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: enhancement
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org
 BugsThisDependsOn: 25062


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

Reply via email to