The fix for PR 93499 introduced a too strict check in gfc_divide
that could trigger errors in the early parsing phase. Relax the
check and defer to a later stage.
gcc/fortran/
2020-05-11 Harald Anlauf <anlauf@gmx.de>
PR fortran/95053
* arith.c (gfc_divide): Do not error out if operand 2 is
non-numeric. Defer checks to later stage.
gcc/testsuite/
2020-05-11 Harald Anlauf <anlauf@gmx.de>
PR fortran/95053
* gfortran.dg/pr95053.f: New test.
+2020-05-11 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/95053
+ * arith.c (gfc_divide): Do not error out if operand 2 is
+ non-numeric. Defer checks to later stage.
+
2020-05-11 Tobias Burnus <tobias@codesourcery.com>
PR fortran/94672
rc = ARITH_DIV0;
break;
default:
- gfc_internal_error ("gfc_divide(): Bad basic type");
+ /* basic type is non-numeric, handle this elsewhere. */
+ break;
}
if (rc == ARITH_DIV0)
{
+2020-05-11 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/95053
+ * gfortran.dg/pr95053.f: New test.
+
2020-05-11 Uroš Bizjak <ubizjak@gmail.com>
PR target/95046
--- /dev/null
+! { dg-do compile }
+! PR fortran/95053 - ICE in gfc_divide(): Bad basic type
+!
+ 123 FORMAT ('A'/'B')
+ 132 FORMAT (A/
+ + ' B')
+ END