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] incorrect run time error on formatted read


------- Additional Comments From coudert at clipper dot ens dot fr  2005-02-21 16:34 -------
gfortran seems to handle incorrectly the case when we ask for more integers than
we provide (Intel compiler, for example, set j and k to 0 in the following
case). Reduced testcase:

$ cat a.f
      program main
      implicit none
      integer i,j,k
      character c
      read(5,'(a1,3i5)') c,i,j,k
      end
$ cat data
c    1
c    1

The error message is:
At line 5 of file a.f
Fortran runtime error: Bad value during integer read

If the second line of the data file is removed, the message becomes:
"Fortran runtime error: End of file"

Reproduced on i686-linux and sparc-sun-solaris2.9

-- 


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]