[patch,libgfortran] PR25419 gfortran read does not take comma for default

Jerry DeLisle jvdelisle@verizon.net
Mon Dec 26 08:01:00 GMT 2005


:ADDPATCH fortran:

The below patch is "simple and obvious" (obvious being a relative term) I will 
commit along with attached test case in ~24 hours unless I am notified 
otherwise.  Behavior with this patch matches g77 and ifort.

NOTE:  The patch may have an offset since I have another patch pending in 
list_read.c

Regards,

Jerry

Regression tested and NIST tested on i686-pc-linux-gnu.

2005-12-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/25419
	* io/list_read.c (list_formatted_read_scalar): Allow comma to return a
	null value (default).

Index: io/list_read.c
===================================================================
*** io/list_read.c      (revision 109050)
--- io/list_read.c      (working copy)
*************** list_formatted_read_scalar (st_parameter
*** 1353,1362 ****
         {                       /* Found a null value.  */
           eat_separator (dtp);
           dtp->u.p.repeat_count = 0;
!         if (dtp->u.p.at_eol)
!           finish_separator (dtp);
!           else
!           goto cleanup;
         }

       }
--- 1353,1359 ----
         {                       /* Found a null value.  */
           eat_separator (dtp);
           dtp->u.p.repeat_count = 0;
!         goto cleanup;
         }

       }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: comma.f
Type: text/x-fortran
Size: 459 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20051226/34f08f83/attachment.bin>


More information about the Gcc-patches mailing list