This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/43043] [-fwhole-file] ICE segfault for select_type_4.f90



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]