[patch,libgfortran] PR35627 [4.3, 4.4 regression] namelist read error

Jerry DeLisle jvdelisle@verizon.net
Thu Mar 20 01:38:00 GMT 2008


I plan to commit the attached patch as obvious/simple.  The failure was not 
clearing the index for the line_buffer used for read ahead in read_logical.  The 
patch moves this clearing of item_count into free_line to avoid similar problems 
in the future and simplify the code. I will commit the test case from the PR

Regression tested on X86-64_linux-gnu.

Regards,

Jerry

2008-03-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/35627
	* io/list_read.c (free_line): Clear the line buffer enable flag and
	reset the index into line_buffer, aka item_count.
	(next_char): Cleanup whitespace.
	(read_logical): Use unget_char to assure that the first character of the
	bad logical is saved in case it is part of an object name. Remove the
	clearing of index and flag that is now in free_line.
	(read_real): Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr35627.diff
Type: text/x-patch
Size: 1652 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080320/9f324c30/attachment.bin>


More information about the Fortran mailing list