[patch, fortran] PR32545 Give compile error not warning for wrong edit format statements

Jerry DeLisle jvdelisle@verizon.net
Tue Jul 3 23:19:00 GMT 2007


The attached patch generates an error on bad formats and propagates that 
information up the call chain to check_io_constraints to give a MATCH_ERROR. 
Otherwise the error was getting buffered out and would not be seen.

Regression tested on latest trunk with x86-64-Gnu/Linux.

OK for trunk?

Regards,

Jerry

2007-07-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/32545
	* io.c (check_format): Always call gfc_error for errors.
	(check_format_string): Change type of this function to try and
	return the result of check_format.
	(check_io_constraints): Return MATCH_ERROR if check_format_string
	returns FAILURE.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr32545.diff
Type: text/x-patch
Size: 2152 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070703/b4f2ee4e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fmt_error.f90
Type: text/x-fortran
Size: 175 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070703/b4f2ee4e/attachment-0001.bin>


More information about the Fortran mailing list