[Bug fortran/103286] ICE in resolve_select, at fortran/resolve.c:8848
anlauf at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Nov 16 19:34:25 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103286
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-11-16
Ever confirmed|0 |1
--- Comment #1 from anlauf at gcc dot gnu.org ---
Confirmed.
Untested patch:
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 705d2326a29..f074a0ab3a1 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -8846,7 +8846,8 @@ resolve_select (gfc_code *code, bool select_type)
|| cp->low != cp->high))
{
gfc_error ("Logical range in CASE statement at %L is not "
- "allowed", &cp->low->where);
+ "allowed",
+ cp->low ? &cp->low->where : &cp->high->where);
t = false;
break;
}
More information about the Gcc-bugs
mailing list