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

             Bug #: 52606
           Summary: Confusing diagnostics for long identifiers
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: fortran
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: anl...@gmx.de


Excessively long identifiers can produce quite confusing diagnostics.
Perhaps error recovery could be improved.

Example:

module gfcbug118
  implicit none
  interface foo
     module procedure very_long_identifier_beyond_31char
  end interface
contains
  subroutine very_long_identifier_beyond_31char ()
  end subroutine very_long_identifier_beyond_31char
end module gfcbug118

% gfc gfcbug118.f90 -std=f95
gfcbug118.f90:4.54:

     module procedure very_long_identifier_beyond_31char
                                                      1
Error: Name at (1) is too long
gfcbug118.f90:7.45:

  subroutine very_long_identifier_beyond_31char ()
                                             1
Error: Name at (1) is too long
gfcbug118.f90:8.5:

  end subroutine very_long_identifier_beyond_31char
     1
Error: Expecting END MODULE statement at (1)
gfcbug118.f90:9.20:

end module gfcbug118
                    1
Error: Fortran 2008: CONTAINS statement without FUNCTION or SUBROUTINE
statement at (1)


%  gfc gfcbug118.f90 -fmax-identifier-length=31
gfcbug118.f90:4.54:

     module procedure very_long_identifier_beyond_31char
                                                      1
Error: Name at (1) is too long
gfcbug118.f90:7.45:

  subroutine very_long_identifier_beyond_31char ()
                                             1
Error: Name at (1) is too long
gfcbug118.f90:8.5:

  end subroutine very_long_identifier_beyond_31char
     1
Error: Expecting END MODULE statement at (1)

Reply via email to