This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/43043] [-fwhole-file] ICE segfault for select_type_4.f90
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Mar 2010 18:00:05 -0000
- Subject: [Bug fortran/43043] [-fwhole-file] ICE segfault for select_type_4.f90
- References: <bug-43043-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from pault at gcc dot gnu dot org 2010-03-18 18:00 -------
The following fixes the PR. I have not regtested yet but anticipate that all
will be well.
Index: ../trunk/gcc/fortran/trans-expr.c
===================================================================
--- ../trunk/gcc/fortran/trans-expr.c (revision 157419)
+++ ../trunk/gcc/fortran/trans-expr.c (working copy)
@@ -4454,6 +4454,8 @@
{
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,
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43043