This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/46971] New: ICE on long class names


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

           Summary: ICE on long class names
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: tkoenig@gcc.gnu.org


Reported by Andrew Benson on

http://gcc.gnu.org/ml/fortran/2010-12/msg00100.html

module Molecular_Abundances_Structure
  public

  type molecularAbundancesStructure
     double precision, allocatable, dimension(:) :: molecularValue
  end type molecularAbundancesStructure

contains

  double precision function Molecules_Abundances(molecules)
    implicit none

    class(molecularAbundancesStructure), intent(in) :: molecules

    return
  end function Molecules_Abundances

end module Molecular_Abundances_Structure

Looking at gfc_new_symbol:

Breakpoint 1, gfc_new_symbol (
    name=0x7fffffffd5f0
"__class_molecular_abundances_structure_molecularabundancesstructure",
    ns=0x148b420) at ../../trunk/gcc/fortran/symbol.c:2551
2551        gfc_internal_error ("new_symbol(): Symbol name too long");
(gdb) p name
$1 = 0x7fffffffd5f0
"__class_molecular_abundances_structure_molecularabundancesstructure"

... which, because we put _class_ before the name, is longer than the
maximum symbol size GFC_MAX_SYMBOL_LEN.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]