[PATCH,Fortran] Suppress unclassifiable statement error message

Steve Kargl sgk@troutmask.apl.washington.edu
Wed Jan 2 01:56:00 GMT 2019


Due to the nuances of issuing error messages with ieee_selected_real_kind
when used in an initialization expression, it became painfully obvious
that gfortran will often issue an "Unclassifiable statement" error
as a run-on error.  I tried to make the "Unclassifiable ..." error a
fatal error, but there is at least one case were the US error is 
emitted before a useful error message.  So, as a compromise I have
elected to make emitting a US error conditional on whether any other
error has been emitted.  Patch tested on i586-*-freebsd.  OK to commit?

2019-01-01  Steven G. Kargl  <kargl@gcc.gnu.org>

	* parse.c (decode_statement):  Suppress "Unclassifiable statement"
	error if previous error messages were emitted.
 
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.

-- 
Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zxc.diff
Type: text/x-diff
Size: 12137 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190102/36d0e1d9/attachment.bin>


More information about the Gcc-patches mailing list