diff options
author | Steven G. Kargl <kargl@gcc.gnu.org> | 2019-01-02 19:13:29 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2019-01-02 19:13:29 +0000 |
commit | f8fdc8c99aed6d39cc29fcd18aa8fd46f7fe9ea3 (patch) | |
tree | 4008553e85f333b3fc2160510fc8fa140770d5f7 /gcc/fortran/parse.c | |
parent | aaf83eb753aaa28980c3ed0bee134fe79025699e (diff) | |
download | gcc-f8fdc8c99aed6d39cc29fcd18aa8fd46f7fe9ea3.zip gcc-f8fdc8c99aed6d39cc29fcd18aa8fd46f7fe9ea3.tar.gz gcc-f8fdc8c99aed6d39cc29fcd18aa8fd46f7fe9ea3.tar.bz2 |
parse.c (decode_statement): Suppress "Unclassifiable statement" error if previous error messages were emittes.
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 Steven G. Kargl <kargl@gcc.gnu.org>
* gfortran.dg/argument_checking_7.f90: Remove run-on error message.
* gfortran.dg/dec_d_lines_3.f: Ditto.
* gfortran.dg/dec_structure_24.f90: Ditto.
* gfortran.dg/dec_structure_26.f90: Ditto.
* gfortran.dg/dec_structure_27.f90: Ditto.
* gfortran.dg/dec_type_print_3.f90: Ditto.
* gfortran.dg/derived_name_1.f90: Ditto.
* gfortran.dg/error_recovery_1.f90: Ditto.
* gfortran.dg/gomp/pr29759.f90: Ditto.
* gfortran.dg/pr36192.f90: Ditto.
* gfortran.dg/pr56007.f90: Ditto.
* gfortran.dg/pr56520.f90: Ditto.
* gfortran.dg/pr78741.f90: Ditto.
* gfortran.dg/print_fmt_2.f90: Ditto.
* gfortran.dg/select_type_20.f90: Ditto.
From-SVN: r267526
Diffstat (limited to 'gcc/fortran/parse.c')
-rw-r--r-- | gcc/fortran/parse.c | 12 |
1 files changed, 9 insertions, 3 deletions
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 (); |