public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "anlauf at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/99839] ICE in inline_matmul_assign, at fortran/frontend-passes.c:4234
Date: Tue, 30 Mar 2021 20:07:46 +0000	[thread overview]
Message-ID: <bug-99839-4-s1voWv4xbv@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99839-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99839

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
                 CC|                            |anlauf at gcc dot gnu.org,
                   |                            |tkoenig at gcc dot gnu.org
   Last reconfirmed|                            |2021-03-30
     Ever confirmed|0                           |1
           Priority|P3                          |P4

--- Comment #1 from anlauf at gcc dot gnu.org ---
This one is funny.  Simply punting on non-numeric and non-logical results
works around the ICE.

diff --git a/gcc/fortran/frontend-passes.c b/gcc/fortran/frontend-passes.c
index 7d3eae67632..213530e46e1 100644
--- a/gcc/fortran/frontend-passes.c
+++ b/gcc/fortran/frontend-passes.c
@@ -4193,6 +4193,19 @@ inline_matmul_assign (gfc_code **c, int *walk_subtrees,
   if (m_case == none)
     return 0;

+  /* We only handle assignment to numeric or logical variables.  */
+  switch(expr1->ts.type)
+    {
+    case BT_INTEGER:
+    case BT_LOGICAL:
+    case BT_REAL:
+    case BT_COMPLEX:
+      break;
+
+    default:
+      return 0;
+    }
+
   ns = insert_block ();

   /* Assign the type of the zero expression for initializing the resulting

Adding Thomas, who knows the code better.

  reply	other threads:[~2021-03-30 20:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-30 19:12 [Bug fortran/99839] New: " gscfq@t-online.de
2021-03-30 20:07 ` anlauf at gcc dot gnu.org [this message]
2021-03-30 20:10 ` [Bug fortran/99839] [8/9/10/11 Regression] " anlauf at gcc dot gnu.org
2021-03-31 12:53 ` marxin at gcc dot gnu.org
2021-05-14  9:54 ` [Bug fortran/99839] [9/10/11/12 " jakub at gcc dot gnu.org
2021-05-27 20:21 ` anlauf at gcc dot gnu.org
2021-06-01  8:20 ` rguenth at gcc dot gnu.org
2021-06-04 17:24 ` cvs-commit at gcc dot gnu.org
2021-06-04 17:42 ` cvs-commit at gcc dot gnu.org
2021-06-04 17:54 ` cvs-commit at gcc dot gnu.org
2021-06-04 18:19 ` cvs-commit at gcc dot gnu.org
2021-06-04 18:22 ` anlauf 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-99839-4-s1voWv4xbv@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).