primary.c
96.3 KB
-
[fortran] ICE in gfc_validate_kind(): Got bad kind [PR93580] · d4c10c9f
Caused by using invalid part_refs in kind specifications, e.g. %re or %im on non-complex expressions and %len on non character expressions. Check whether %re, %im and %len are valid when checking kind specification. The original patch from Steven G. Kargl <kargl@gcc.gnu.org> only checked for %re and %im. gcc/fortran/ChangeLog: PR fortran/93580 * primary.c (gfc_match_varspec): If the symbol following % is re or im and the primary expression type is not BT_COMPLEX issue an error. If the symbol is len and the primary expression type is not BT_CHARACTER is an error. gcc/testsuite/ChangeLog: PR fortran/93580 * gfortran.dg/dg/pr93580.f90: New test.
Mark Eggleston committed