[patch, libgfortran] PR31052 Bad IOSTAT values when readings NAMELISTs past EOF

Jerry DeLisle jvdelisle@verizon.net
Tue Mar 27 09:19:00 GMT 2007

I will commit the following patch under the obvious and simple rule to trunk.

This fixes the latest test case for pr31052 and does not break the SPEC 
benchmark.  Namelist fails without this patch which avoids the call to 
test_endfile.  SPEC fails without the call to test_endfile.

I will, as I have time, work up a suitable testcase.  (see the pr for the test 
case involved)  I also will try to get the publicly available six.f program to 
compile and run and see if I can determine any better approach to all this.  For 
now it fixes the problem.



Index: io/transfer.c
*** io/transfer.c       (revision 123253)
--- io/transfer.c       (working copy)
*************** next_record_r (st_parameter_dt *dtp)
*** 2228,2234 ****

!   if (dtp->u.p.current_unit->flags.access == ACCESS_SEQUENTIAL)
       test_endfile (dtp->u.p.current_unit);

--- 2228,2235 ----

!   if (dtp->u.p.current_unit->flags.access == ACCESS_SEQUENTIAL
!       && !dtp->u.p.namelist_mode)
       test_endfile (dtp->u.p.current_unit);

More information about the Gcc-patches mailing list