This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/43990] [OOP] ICE in output_constructor_regular_field, at varasm.c:4995
- From: "janus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 May 2010 22:11:03 -0000
- Subject: [Bug fortran/43990] [OOP] ICE in output_constructor_regular_field, at varasm.c:4995
- References: <bug-43990-16146@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from janus at gcc dot gnu dot org 2010-05-16 22:11 -------
The ICE is fixed by removing this unneeded (and buggy) piece of code:
Index: gcc/fortran/trans-expr.c
===================================================================
--- gcc/fortran/trans-expr.c (revision 159444)
+++ gcc/fortran/trans-expr.c (working copy)
@@ -4337,21 +4337,8 @@ gfc_conv_structure (gfc_se * se, gfc_expr * expr,
if (!c->expr || cm->attr.allocatable)
continue;
- if (cm->ts.type == BT_CLASS && !cm->attr.proc_pointer)
+ if (strcmp (cm->name, "$size") == 0)
{
- gfc_component *data;
- data = gfc_find_component (cm->ts.u.derived, "$data", true, true);
- if (!data->backend_decl)
- gfc_get_derived_type (cm->ts.u.derived);
- val = gfc_conv_initializer (c->expr, &cm->ts,
- TREE_TYPE (data->backend_decl),
- data->attr.dimension,
- data->attr.pointer);
-
- CONSTRUCTOR_APPEND_ELT (v, data->backend_decl, val);
- }
- else if (strcmp (cm->name, "$size") == 0)
- {
val = TYPE_SIZE_UNIT (gfc_get_derived_type (cm->ts.u.derived));
CONSTRUCTOR_APPEND_ELT (v, cm->backend_decl, val);
}
--
janus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |janus at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2010-05-05 14:12:54 |2010-05-16 22:11:03
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43990