aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/parse.c12
2 files changed, 14 insertions, 3 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 245772de..303892d 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,8 @@
+2019-01-01 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ * parse.c (decode_statement): Suppress "Unclassifiable statement"
+ error if previous error messages were emittes.
+
2019-01-01 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/82743
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c
index 399867b..6b33c57 100644
--- a/gcc/fortran/parse.c
+++ b/gcc/fortran/parse.c
@@ -587,10 +587,16 @@ decode_statement (void)
}
/* All else has failed, so give up. See if any of the matchers has
- stored an error message of some sort. */
-
+ stored an error message of some sort. Suppress the "Unclassifiable
+ statement" if a previous error message was emitted, e.g., by
+ gfc_error_now (). */
if (!gfc_error_check ())
- gfc_error_now ("Unclassifiable statement at %C");
+ {
+ int ecnt;
+ gfc_get_errors (NULL, &ecnt);
+ if (ecnt <= 0)
+ gfc_error_now ("Unclassifiable statement at %C");
+ }
reject_statement ();