public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/46971] New: ICE on long class names
@ 2010-12-15 20:59 tkoenig at gcc dot gnu.org
2010-12-15 21:45 ` [Bug fortran/46971] " dominiq at lps dot ens.fr
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2010-12-15 20:59 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/46971] ICE on long class names
2010-12-15 20:59 [Bug fortran/46971] New: ICE on long class names tkoenig at gcc dot gnu.org
@ 2010-12-15 21:45 ` dominiq at lps dot ens.fr
2010-12-15 21:55 ` burnus at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dominiq at lps dot ens.fr @ 2010-12-15 21:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46971
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2010-12-15 21:45:06 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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/46971] ICE on long class names
2010-12-15 20:59 [Bug fortran/46971] New: ICE on long class names tkoenig at gcc dot gnu.org
2010-12-15 21:45 ` [Bug fortran/46971] " dominiq at lps dot ens.fr
@ 2010-12-15 21:55 ` burnus at gcc dot gnu.org
2010-12-15 22:17 ` dominiq at lps dot ens.fr
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-12-15 21:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46971
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-12-15 21:55:17 UTC ---
Isn't this a duplicate of PR 46313?
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/46971] ICE on long class names
2010-12-15 20:59 [Bug fortran/46971] New: ICE on long class names tkoenig at gcc dot gnu.org
2010-12-15 21:45 ` [Bug fortran/46971] " dominiq at lps dot ens.fr
2010-12-15 21:55 ` burnus at gcc dot gnu.org
@ 2010-12-15 22:17 ` dominiq at lps dot ens.fr
2010-12-30 13:40 ` [Bug fortran/46971] [4.6 Regression] [OOP] " janus at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dominiq at lps dot ens.fr @ 2010-12-15 22:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46971
--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2010-12-15 22:16:51 UTC ---
> 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;-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/46971] [4.6 Regression] [OOP] ICE on long class names
2010-12-15 20:59 [Bug fortran/46971] New: ICE on long class names tkoenig at gcc dot gnu.org
` (2 preceding siblings ...)
2010-12-15 22:17 ` dominiq at lps dot ens.fr
@ 2010-12-30 13:40 ` janus at gcc dot gnu.org
2010-12-31 10:08 ` janus at gcc dot gnu.org
2010-12-31 10:18 ` janus at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: janus at gcc dot gnu.org @ 2010-12-30 13:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46971
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2010.12.30 13:40:20
AssignedTo|unassigned at gcc dot |janus at gcc dot gnu.org
|gnu.org |
Summary|[OOP] ICE on long class |[4.6 Regression] [OOP] ICE
|names |on long class names
Ever Confirmed|0 |1
--- Comment #4 from janus at gcc dot gnu.org 2010-12-30 13:40:20 UTC ---
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 ...
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/46971] [4.6 Regression] [OOP] ICE on long class names
2010-12-15 20:59 [Bug fortran/46971] New: ICE on long class names tkoenig at gcc dot gnu.org
` (3 preceding siblings ...)
2010-12-30 13:40 ` [Bug fortran/46971] [4.6 Regression] [OOP] " janus at gcc dot gnu.org
@ 2010-12-31 10:08 ` janus at gcc dot gnu.org
2010-12-31 10:18 ` janus at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: janus at gcc dot gnu.org @ 2010-12-31 10:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46971
--- Comment #5 from janus at gcc dot gnu.org 2010-12-31 10:08:22 UTC ---
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/46971] [4.6 Regression] [OOP] ICE on long class names
2010-12-15 20:59 [Bug fortran/46971] New: ICE on long class names tkoenig at gcc dot gnu.org
` (4 preceding siblings ...)
2010-12-31 10:08 ` janus at gcc dot gnu.org
@ 2010-12-31 10:18 ` janus at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: janus at gcc dot gnu.org @ 2010-12-31 10:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46971
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #6 from janus at gcc dot gnu.org 2010-12-31 10:18:00 UTC ---
Fixed with r168363. Closing.
Thanks to Andrew for reporting this!
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-12-31 10:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-15 20:59 [Bug fortran/46971] New: ICE on long class names tkoenig at gcc dot gnu.org
2010-12-15 21:45 ` [Bug fortran/46971] " dominiq at lps dot ens.fr
2010-12-15 21:55 ` burnus at gcc dot gnu.org
2010-12-15 22:17 ` dominiq at lps dot ens.fr
2010-12-30 13:40 ` [Bug fortran/46971] [4.6 Regression] [OOP] " janus at gcc dot gnu.org
2010-12-31 10:08 ` janus at gcc dot gnu.org
2010-12-31 10:18 ` janus at gcc dot gnu.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).