public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "janus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/43990] [OOP] ICE in output_constructor_regular_field, at varasm.c:4995
Date: Sun, 16 May 2010 22:11:00 -0000	[thread overview]
Message-ID: <20100516221103.7182.qmail@sourceware.org> (raw)
In-Reply-To: <bug-43990-16146@http.gcc.gnu.org/bugzilla/>



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


  parent reply	other threads:[~2010-05-16 22:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-05  9:27 [Bug fortran/43990] New: " janus at gcc dot gnu dot org
2010-05-05 12:41 ` [Bug fortran/43990] " burnus at gcc dot gnu dot org
2010-05-05 14:13 ` burnus at gcc dot gnu dot org
2010-05-06 16:28 ` burnus at gcc dot gnu dot org
2010-05-06 16:37 ` burnus at gcc dot gnu dot org
2010-05-16 22:11 ` janus at gcc dot gnu dot org [this message]
2010-05-17 17:09 ` dominiq at lps dot ens dot fr
2010-05-17 17:41 ` janus at gcc dot gnu dot org
2010-05-17 19:59 ` janus at gcc dot gnu dot org
2010-05-17 20:05 ` janus at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100516221103.7182.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).