public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "janus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/47728] [OOP] ICE on invalid CLASS declaration
Date: Mon, 14 Feb 2011 12:24:00 -0000	[thread overview]
Message-ID: <bug-47728-4-MjlcXVmqsK@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-47728-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47728

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |janus at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #8 from janus at gcc dot gnu.org 2011-02-14 12:23:00 UTC ---
Ok, here is a simple draft patch which gets rid of the ICE:

Index: gcc/fortran/primary.c
===================================================================
--- gcc/fortran/primary.c       (revision 170124)
+++ gcc/fortran/primary.c       (working copy)
@@ -1770,8 +1770,8 @@ gfc_match_varspec (gfc_expr *primary, int equiv_fl

   if ((equiv_flag && gfc_peek_ascii_char () == '(')
       || gfc_peek_ascii_char () == '[' || sym->attr.codimension
-      || (sym->attr.dimension && !sym->attr.proc_pointer
-         && !gfc_is_proc_ptr_comp (primary, NULL)
+      || (sym->attr.dimension && sym->ts.type != BT_CLASS
+         && !sym->attr.proc_pointer && !gfc_is_proc_ptr_comp (primary, NULL)
          && !(gfc_matching_procptr_assignment
               && sym->attr.flavor == FL_PROCEDURE))
       || (sym->ts.type == BT_CLASS && sym->attr.class_ok


If this survives the testsuite, I will commit it as obvious.


  parent reply	other threads:[~2011-02-14 12:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-14  9:00 [Bug fortran/47728] New: Assigning an object of one type to a class variable leads to an ICE arjen.markus at deltares dot nl
2011-02-14 10:09 ` [Bug fortran/47728] [OOP] ICE on invalid CLASS declaration janus at gcc dot gnu.org
2011-02-14 10:12 ` janus at gcc dot gnu.org
2011-02-14 10:23 ` janus at gcc dot gnu.org
2011-02-14 10:27 ` dominiq at lps dot ens.fr
2011-02-14 12:24 ` janus at gcc dot gnu.org [this message]
2011-02-14 14:06 ` janus at gcc dot gnu.org
2011-02-14 18:17 ` janus at gcc dot gnu.org
2011-02-14 18:18 ` janus at gcc dot gnu.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=bug-47728-4-MjlcXVmqsK@http.gcc.gnu.org/bugzilla/ \
    --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).