[Bug fortran/93500] ICE in gfc_numeric_ts, at fortran/expr.c:891
kargl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 5 22:11:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93500
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu.org
--- Comment #2 from kargl at gcc dot gnu.org ---
This prevents the ICE and allows for a (non)sensible error message.
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c (revision 280157)
+++ gcc/fortran/resolve.c (working copy)
@@ -3981,6 +3981,9 @@ resolve_operator (gfc_expr *e)
op2 = e->value.op.op2;
dual_locus_error = false;
+ if (!op1 && !op2)
+ return false;
+
/* op1 and op2 cannot both be BOZ. */
if (op1 && op1->ts.type == BT_BOZ
&& op2 && op2->ts.type == BT_BOZ)
More information about the Gcc-bugs
mailing list