[patch, libgfortran] [4.9/4.10 Regression] Internal read of negative integer broken

Jerry DeLisle jvdelisle@charter.net
Thu Jun 26 01:59:00 GMT 2014


Hi,

This bug has nothing to do with negative numbers as in the description.
However, the problem is due to seeking when there are no spaces to skip.  I
restructured the loop so that the skipping is not done if there are no spaces.

Regression tested on x86-64.  New test case from the PR.

OK for trunk and 4.9?

Regards,

Jerry

2014-06-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/61499
	* io/list_read.c (eat_spaces): Use a 'for' loop instead of
	'while' loop to skip the loop if there are no bytes left in the
	string. Only seek if actual spaces can be skipped.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr61499.diff
Type: text/x-patch
Size: 2490 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20140626/2730a9b4/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arrayio_15.f90
Type: text/x-fortran
Size: 325 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20140626/2730a9b4/attachment-0001.bin>


More information about the Fortran mailing list