From 4381322d6eddf1d162f35e4965b55fcb23808d3c Mon Sep 17 00:00:00 2001 From: "Steven G. Kargl" Date: Sat, 24 Oct 2015 17:09:35 +0000 Subject: re PR fortran/68055 (ICE on using unsupported kinds in program without program statement) 2015-10-24 Steven G. Kargl PR fortran/68055 * decl.c (gfc_match_decl_type_spec): Check for valid kind in old-style declarations. 2015-10-24 Steven G. Kargl PR fortran/68055 * gfortran.dg/pr68055.f90: New case. From-SVN: r229288 --- gcc/fortran/decl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gcc/fortran/decl.c') diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 200a128..651f1b0 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -3021,7 +3021,11 @@ get_kind: m = gfc_match_kind_spec (ts, false); if (m == MATCH_NO && ts->type != BT_CHARACTER) - m = gfc_match_old_kind_spec (ts); + { + m = gfc_match_old_kind_spec (ts); + if (gfc_validate_kind (ts->type, ts->kind, true) == -1) + return MATCH_ERROR; + } if (matched_type && gfc_match_char (')') != MATCH_YES) return MATCH_ERROR; -- cgit v1.1