This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/20108] New: incorrect run time error on formatted read


I have used this format statement for quite a while and I don't see anything
wrong with the program or data -

[dir:~/tests/gfortran] dir% gfortran -o fread01 fread01.f
[dir:~/tests/gfortran] dir% fread01 < fread01.dat
At line 6 of file fread01.f
Fortran runtime error: Bad value during integer read
[dir:~/tests/gfortran] dir% cat fread01.f
      program main
      dimension x(10),y(10),z(10)
      integer idt(6)
      character*1 it,jpr
   10 read(5,1000) it,n,jpr,(idt(i),i=1,6),x(n),y(n),z(n),kn,
     1                 nrst,mids
      write (6,2002) it,n,idt,x(n),y(n),z(n),kn,nrst,mids
      stop
 1000 format (a1,i4,a1,i4,5i5,3f10.0,3i5)
 2002 format(2x,a1,2x,i5,5x,6i5,3f13.4,5x,i5,i7,i6)
      end

[dir:~/tests/gfortran] dir% cat fread01.dat
    1c   1    1    0    1    1    1        0. 1.225E-15 20.000000    1
    2c   1    1    0    1    1    1        0. 1.194E-15 19.500000    1

-- 
           Summary: incorrect run time error on formatted read
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dir at lanl dot gov
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: powerpc-apple-darwin7.8.0


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]