gcc/fortran/ChangeLog:
PR fortran/88552
* decl.cc (gfc_match_kind_spec): Use error path on missing right
parenthesis.
(gfc_match_decl_type_spec): Use error return when an error occurred
during matching a KIND specifier.
gcc/testsuite/ChangeLog:
PR fortran/88552
* gfortran.dg/pr88552.f90: New test.
else
gfc_error ("Missing right parenthesis at %C");
m = MATCH_ERROR;
+ goto no_match;
}
else
/* All tests passed. */
}
m = gfc_match_kind_spec (ts, false);
+ if (m == MATCH_ERROR)
+ return MATCH_ERROR;
+
if (m == MATCH_NO && ts->type != BT_CHARACTER)
{
m = gfc_match_old_kind_spec (ts);
--- /dev/null
+! { dg-do compile }
+! PR fortran/88552
+! Contributed by G.Steinmetz
+
+integer(len((c)) :: n ! { dg-error "must be CHARACTER" }
+end