[PATCH, libgfortran] Fix for PR25039

Jerry DeLisle jvdelisle@verizon.net
Mon Nov 28 01:28:00 GMT 2005


:addpatch fortran:

The included patch and test case fixes the handling of commas encountered during 
numeric inputs.  I created a new flag to check to minimize having to change code 
all over the place.

2005-11-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/25039
	* io/io.h: Create a new flag sf_read_comma to control comma
	separators in numeric reads.
	* io/transfer.c (formatted_transfer_scalar): Initialize the flag.
	  (read_sf): Check for commas coming in and if the flag is set,
	  shortcut the read.
	* io/read.c (read_a) (read_x): Clear the flag for character reads and
	  reset it after the reads.

Attached patch regression tested.  OK for trunk? and 4.1?

I am think about adding some checks for std= and pedantic after I review the F95 
standard and see where this falls out.  Ifort and g77 do it this way.

Regards,

Jerry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr25039.diff
Type: text/x-patch
Size: 2383 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20051128/1a601cb8/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: read_comma.f
Type: text/x-fortran
Size: 1250 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20051128/1a601cb8/attachment-0001.bin>


More information about the Gcc-patches mailing list