[patch, libfortran] PR43298 Fortran library does not read in NaN -Inf or Inf

Jerry DeLisle jvdelisle@verizon.net
Sun Jun 27 19:40:00 GMT 2010


This attached patch adds code to read these special cases.  The code is self 
explanatory. This added feature is for formatted READ.

As a follow-up patch we can consider the contents of the parenthesis with NAN() 
and explicitly set the result. I will also be looking at how to handle signs.

Regression tested on x86-64. testing on other platforms would be appreciated.

OK for trunk?

Regards,

Jerry

2010-06-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/43298
	* io/read.c: Add code to parse and read Inf, Infinity, NaN, and Nan with
	optional parenthesis.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: infnan-3.diff
Type: text/x-patch
Size: 1833 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20100627/17609406/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: read_infnan_1.f90
Type: text/x-fortran
Size: 791 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20100627/17609406/attachment-0001.bin>


More information about the Fortran mailing list