Summary: | [4.6 Regression] [OOP] ICE on long class names | ||
---|---|---|---|
Product: | gcc | Reporter: | Thomas Koenig <tkoenig> |
Component: | fortran | Assignee: | janus |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | abensonca, burnus, janus |
Priority: | P3 | Keywords: | ice-on-valid-code |
Version: | 4.6.0 | ||
Target Milestone: | 4.6.0 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2010-12-30 13:40:20 |
Description
Thomas Koenig
2010-12-15 20:59:43 UTC
Confirmed (on x86_64-apple-darwin10.5.0 the compilation hangs). The test passes if I remove four characters to both Molecular_Abundances_Structure and molecularAbundancesStructure. > Isn't this a duplicate of PR 46313? I won't say so, but it is an instance of your fears in the comment #15 of PR 46313;-) This is a 4.6 regression. Here is a more compactified version of the test case: module Molecular_Abundances_Structure type molecularAbundancesStructure end type class(molecularAbundancesStructure), pointer :: molecules end module It can be fixed by using hashed strings for the vtab names, as proposed by Tobias in PR46313. I'm working on a patch ... Author: janus Date: Fri Dec 31 10:08:17 2010 New Revision: 168363 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168363 Log: 2010-12-31 Janus Weil <janus@gcc.gnu.org> PR fortran/46971 * gfortran.h (gfc_hash_value): Add prototype. * class.c (get_unique_type_string): Check if proc_name is present and make sure string contains an underscore. (get_unique_hashed_string): New function which creates a hashed string if the given unique string is too long. (gfc_hash_value): Moved here from decl.c, renamed and simplified. (gfc_build_class_symbol, gfc_find_derived_vtab): Use hashed strings. * decl.c (hash_value): Moved to class.c. (gfc_match_derived_decl): Renamed 'hash_value'. 2010-12-31 Janus Weil <janus@gcc.gnu.org> PR fortran/46971 * gfortran.dg/class_33.f90: New. Added: trunk/gcc/testsuite/gfortran.dg/class_33.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/class.c trunk/gcc/fortran/decl.c trunk/gcc/fortran/gfortran.h trunk/gcc/testsuite/ChangeLog |