The following reduced test case fails to correctly read the same line twice from the input file. This was derived from the new Polyhedron test aermod.f90 which fails. character*132 :: rdfrm, runst1, foost character*1 :: runst(132) inunit = 11 open (inunit, file = "AERMODTEST.INP") RDFRM = "(A080,T1,080A)" ! read the same line twice READ (INUNIT, '(A080,T1,080A)', end = 999) RUNST1 , foost write (*,'(a80)') runst1 write (*,'(a80)') foost READ (INUNIT, '(A080,T1,080A)', end = 999) RUNST1 , foost write (*,'(a80)') runst1 write (*,'(a80)') foost READ (INUNIT, '(A080,T1,080A)', end = 999) RUNST1 , foost write (*,'(a80)') runst1 write (*,'(a80)') foost goto 1000 999 call exit () 1000 continue end The input file is: $ cat AERMODTEST.INP CO STARTING TITLEONE A Simple Example Problem for the AERMOD Model with PRIME MODELOPT CONC FLAT AVERTIME 3 24 PERIOD POLLUTID SO2 RUNORNOT RUN CO FINISHED
Subject: Bug 24699 Author: jvdelisle Date: Fri Nov 11 20:19:21 2005 New Revision: 106797 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106797 Log: 2005-11-09 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/24699, 24700, 24719, 24785 * io/transfer.c (read_sf): Remove incorrect statement that was clearing bytes_left. (formatted_transfer_scalar): Add handling of end-of-record condition, setting values correctly to backup. Handle x format when doing non-advancing write. (st_read): Initialize current_record. Modified: trunk/libgfortran/io/transfer.c
Subject: Bug 24699 Author: jvdelisle Date: Fri Nov 11 20:31:06 2005 New Revision: 106798 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106798 Log: 2005-11-11 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/24719 gfortran.dg/read_noadvance.f90: New test. PR libgfortran/24699 gfortran.dg/fmt_t_2.f90: New test. PR libgfortran/24785 gfortran.dg/read_x_eor.f90: New test. PR libgfortran/24584 gfortran.dg/namelist_empty.f90: Rename test. PR libgfortran/24489 gfortran/read_eor.f90: Rename test. Added: trunk/gcc/testsuite/gfortran.dg/fmt_t_2.f90 trunk/gcc/testsuite/gfortran.dg/namelist_empty.f90 trunk/gcc/testsuite/gfortran.dg/read_eor.f90 trunk/gcc/testsuite/gfortran.dg/read_noadvance.f90 trunk/gcc/testsuite/gfortran.dg/read_x_eor.f90
Subject: Bug 24699 Author: jvdelisle Date: Sat Nov 12 22:22:53 2005 New Revision: 106838 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106838 Log: 2005-11-12 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/24699, 24700, 24719, 24785 * io/transfer.c (read_sf): Remove incorrect statement that was clearing bytes_left. (formatted_transfer_scalar): Add handling of end-of-record condition, setting values correctly to backup. Handle x format when doing non-advancing write. (st_read): Initialize current_record. PR libgfortran/24584 * io/list_read.c (free_saved): Set saved_used to zero. Modified: branches/gcc-4_0-branch/libgfortran/ChangeLog branches/gcc-4_0-branch/libgfortran/io/list_read.c branches/gcc-4_0-branch/libgfortran/io/transfer.c
Subject: Bug 24699 Author: jvdelisle Date: Sat Nov 12 22:31:18 2005 New Revision: 106839 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106839 Log: 2005-11-12 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/24719 *gfortran.dg/read_noadvance.f90: New test. PR libgfortran/24699 *gfortran.dg/fmt_t_2.f90: New test. PR libgfortran/24785 *gfortran.dg/read_x_eor.f90: New test. PR libgfortran/24584 *gfortran.dg/namelist_empty.f90: Rename test. *gfortran.dg/f77/1832.f: Backport from 4.1. Added: branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/fmt_t_2.f90 branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/namelist_empty.f90 branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/read_noadvance.f90 branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/read_x_eor.f90 Modified: branches/gcc-4_0-branch/gcc/testsuite/ChangeLog branches/gcc-4_0-branch/gcc/testsuite/gfortran.dg/g77/1832.f
Fixed in 4.0.3 and 4.1