Committed as simple and obvious after discussion in PR.
Harald Am 28.10.21 um 23:03 schrieb Harald Anlauf via Fortran:
Dear Fortranners, the original fix by Steve was lingering in the PR. We did ICE in situations where in a SELECT CASE a kind conversion was deemed necessary, but it did involve different types. The check gfc_convert_type_warn () was invoked with arguments requesting to generate an internal error. A regular gfc_error is good enough here. Regtested on x86_64-pc-linux-gnu. OK? Thanks, also to Steve, Harald Fortran: generate regular error on invalid conversions of CASE expressions gcc/fortran/ChangeLog: PR fortran/99853 * resolve.c (resolve_select): Generate regular gfc_error on invalid conversions instead of an gfc_internal_error. gcc/testsuite/ChangeLog: PR fortran/99853 * gfortran.dg/pr99853.f90: New test.