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


-- 
           Summary: READ with T format specifier fails on end-of-record
                    condition
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libfortran
        AssignedTo: jvdelisle at gcc dot gnu dot org
        ReportedBy: jvdelisle at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24699

Reply via email to