diff options
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r-- | gcc/fortran/decl.c | 6 |
1 files changed, 5 insertions, 1 deletions
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; |