diff options
author | Steven G. Kargl <kargl@gcc.gnu.org> | 2015-10-24 17:09:35 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2015-10-24 17:09:35 +0000 |
commit | 4381322d6eddf1d162f35e4965b55fcb23808d3c (patch) | |
tree | de39edf68f4b514d8c71192d6445e3686f8f39d8 /gcc/fortran/decl.c | |
parent | 8d48826b99b81b7ed96c5db08ec8334a2b0c6557 (diff) | |
download | gcc-4381322d6eddf1d162f35e4965b55fcb23808d3c.zip gcc-4381322d6eddf1d162f35e4965b55fcb23808d3c.tar.gz gcc-4381322d6eddf1d162f35e4965b55fcb23808d3c.tar.bz2 |
re PR fortran/68055 (ICE on using unsupported kinds in program without program statement)
2015-10-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/68055
* decl.c (gfc_match_decl_type_spec): Check for valid kind in old-style
declarations.
2015-10-24 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/68055
* gfortran.dg/pr68055.f90: New case.
From-SVN: r229288
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; |