This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/60234] [4.9 Regression] [OOP] ICE in generate_finalization_wrapper at fortran/class.c:1883
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 17 Feb 2014 10:39:45 +0000
- Subject: [Bug fortran/60234] [4.9 Regression] [OOP] ICE in generate_finalization_wrapper at fortran/class.c:1883
- Auto-submitted: auto-generated
- References: <bug-60234-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60234
--- Comment #2 from janus at gcc dot gnu.org ---
This patchlet seems to be sufficient to fix the ICE:
Index: gcc/fortran/decl.c
===================================================================
--- gcc/fortran/decl.c (revision 207804)
+++ gcc/fortran/decl.c (working copy)
@@ -1199,7 +1199,7 @@ build_sym (const char *name, gfc_charlen *cl, bool
sym->attr.implied_index = 0;
if (sym->ts.type == BT_CLASS)
- return gfc_build_class_symbol (&sym->ts, &sym->attr, &sym->as, false);
+ return gfc_build_class_symbol (&sym->ts, &sym->attr, &sym->as, true);
return true;
}
Comment 1 compiles fine with this, but comment 0 hits another ICE:
ObjectLists.f90:186:0: internal compiler error: Segmentation fault
class is (object_array_pointer)
^
0x93e90f crash_signal
/home/jweil/gcc49/trunk/gcc/toplev.c:337
0x672420 gfc_get_derived_type(gfc_symbol*)
/home/jweil/gcc49/trunk/gcc/fortran/trans-types.c:2455
0x672988 gfc_typenode_for_spec(gfc_typespec*)
/home/jweil/gcc49/trunk/gcc/fortran/trans-types.c:1112
0x671263 gfc_sym_type(gfc_symbol*)
/home/jweil/gcc49/trunk/gcc/fortran/trans-types.c:2137
0x671728 gfc_get_function_type(gfc_symbol*)
/home/jweil/gcc49/trunk/gcc/fortran/trans-types.c:2797
0x6721ca gfc_get_ppc_type(gfc_component*)
/home/jweil/gcc49/trunk/gcc/fortran/trans-types.c:2322
0x6726a7 gfc_get_derived_type(gfc_symbol*)
/home/jweil/gcc49/trunk/gcc/fortran/trans-types.c:2484
0x672988 gfc_typenode_for_spec(gfc_typespec*)
/home/jweil/gcc49/trunk/gcc/fortran/trans-types.c:1112
0x671263 gfc_sym_type(gfc_symbol*)
/home/jweil/gcc49/trunk/gcc/fortran/trans-types.c:2137
0x637b96 gfc_get_symbol_decl(gfc_symbol*)
/home/jweil/gcc49/trunk/gcc/fortran/trans-decl.c:1390
0x639f99 gfc_create_module_variable
/home/jweil/gcc49/trunk/gcc/fortran/trans-decl.c:4267
0x607453 do_traverse_symtree
/home/jweil/gcc49/trunk/gcc/fortran/symbol.c:3575
0x63ae12 gfc_generate_module_vars(gfc_namespace*)
/home/jweil/gcc49/trunk/gcc/fortran/trans-decl.c:4693
0x61cef1 gfc_generate_module_code(gfc_namespace*)
/home/jweil/gcc49/trunk/gcc/fortran/trans.c:1930
0x5db92b translate_all_program_units
/home/jweil/gcc49/trunk/gcc/fortran/parse.c:4523
0x5db92b gfc_parse_file()
/home/jweil/gcc49/trunk/gcc/fortran/parse.c:4733
0x618335 gfc_be_parse_file
/home/jweil/gcc49/trunk/gcc/fortran/f95-lang.c:188