aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/match.c10
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 7d3e31e..cf42e38 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2015-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/66245
+ * match.c (gfc_match_type_is, gfc_match_class_is): Check if the
+ return type spec or derived type spec is validate.
+
2015-06-06 Thomas Koenig <tkoenig@netcologne.de>
PR fortran/47659
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
index b51d18a..c064135 100644
--- a/gcc/fortran/match.c
+++ b/gcc/fortran/match.c
@@ -5456,7 +5456,10 @@ gfc_match_type_is (void)
c = gfc_get_case ();
c->where = gfc_current_locus;
- if (gfc_match_type_spec (&c->ts) == MATCH_ERROR)
+ m = gfc_match_type_spec (&c->ts);
+ if (m == MATCH_NO)
+ goto syntax;
+ if (m == MATCH_ERROR)
goto cleanup;
if (gfc_match_char (')') != MATCH_YES)
@@ -5536,7 +5539,10 @@ gfc_match_class_is (void)
c = gfc_get_case ();
c->where = gfc_current_locus;
- if (match_derived_type_spec (&c->ts) == MATCH_ERROR)
+ m = match_derived_type_spec (&c->ts);
+ if (m == MATCH_NO)
+ goto syntax;
+ if (m == MATCH_ERROR)
goto cleanup;
if (c->ts.type == BT_DERIVED)