-
- Downloads
[fortran] ICE in gfc_validate_kind(): Got bad kind [PR93580]
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.
Showing
- gcc/fortran/ChangeLog 9 additions, 0 deletionsgcc/fortran/ChangeLog
- gcc/fortran/primary.c 22 additions, 2 deletionsgcc/fortran/primary.c
- gcc/testsuite/ChangeLog 5 additions, 0 deletionsgcc/testsuite/ChangeLog
- gcc/testsuite/gfortran.dg/pr93580.f90 13 additions, 0 deletionsgcc/testsuite/gfortran.dg/pr93580.f90
Loading
Please register or sign in to comment