[Bug fortran/93601] [10 Regression] ICE: Invalid expression in gfc_element_size
kargl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 5 21:30:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93601
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
Status|UNCONFIRMED |NEW
Last reconfirmed| |2020-02-05
CC| |kargl at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from kargl at gcc dot gnu.org ---
Patch is against svn r280157.
Index: gcc/fortran/match.c
===================================================================
--- gcc/fortran/match.c (revision 280157)
+++ gcc/fortran/match.c (working copy)
@@ -1348,6 +1348,16 @@ gfc_match_assignment (void)
rvalue = NULL;
m = gfc_match (" %e%t", &rvalue);
+ if (m == MATCH_YES
+ && rvalue->ts.type == BT_BOZ
+ && lvalue->ts.type == BT_CLASS)
+ {
+ m = MATCH_ERROR;
+ gfc_error ("BOZ literal constant at %L is neither a DATA statement "
+ "value nor an actual argument of INT/REAL/DBLE/CMPLX "
+ "intrinsic subprogram", &rvalue->where);
+ }
+
if (lvalue->expr_type == EXPR_CONSTANT)
{
/* This clobbers %len and %kind. */
More information about the Gcc-bugs
mailing list