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.