[patch, libgfortran] PR25463 T edit descriptor and ADVANCE="no" fix

Jerry DeLisle jvdelisle@verizon.net
Mon Dec 19 06:44:00 GMT 2005


Hi,

I will commit the following as obvious.  Reviewed by Thomas Koenig.

Test case provided.  NIST tested, regression tested.  The statement had to be 
moved up in the function so it was not getting skipped when advance='no'.

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

	PR libgfortran/25463
	* io/transfer.c (finalize_transfer): Fix execution order so that
	next_record is set to zero in all cases.

Index: io/transfer.c
===================================================================
*** io/transfer.c       (revision 108783)
--- io/transfer.c       (working copy)
*************** finalize_transfer (st_parameter_dt *dtp)
*** 2017,2022 ****
--- 2017,2023 ----
       finish_list_read (dtp);
     else
       {
+       dtp->u.p.current_unit->current_record = 0;
         if (dtp->u.p.advance_status == ADVANCE_NO || dtp->u.p.seen_dollar)
         {
           /* Most systems buffer lines, so force the partial record
*************** finalize_transfer (st_parameter_dt *dtp)
*** 2027,2033 ****
         }

         next_record (dtp, 1);
-       dtp->u.p.current_unit->current_record = 0;
       }

     sfree (dtp->u.p.current_unit->s);
--- 2028,2033 ----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: advance.f90
Type: application/x-extension-f90
Size: 353 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20051219/63966f9a/attachment.bin>


More information about the Gcc-patches mailing list