This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/19679] New: DOS files don't work for formatted input if line length is exceeded
- From: "Thomas dot Koenig at online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jan 2005 22:59:55 -0000
- Subject: [Bug libfortran/19679] New: DOS files don't work for formatted input if line length is exceeded
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
CR-LF (the DOS convenction for text files) as record separators
don't work well for formatted input, either:
$ cat dosfile-2.f
program main
write (12,'(2A)') ' 1',achar(13)
write (12,'(2A)') ' 2',achar(13)
rewind(12)
read(12,'(I4)') n1
print *,n1
read(12,'(I5)') n2
print *,n2
end
$ gfortran dosfile-2.f
$ ./a.out
1
At line 7 of file dosfile-2.f
Fortran runtime error: Bad value during integer read
$ gfortran -v ; gfortran -dumpmachine
Using built-in specs.
Configured with: ../gcc/configure --prefix=/home/ig25 --enable-languages=c,f95
Thread model: posix
gcc version 4.0.0 20050127 (experimental)
i686-pc-linux-gnu
$ od -c fort.12
0000000 1 \r \n 2 \r \n
0000014
--
Summary: DOS files don't work for formatted input if line length
is exceeded
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libfortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Thomas dot Koenig at online dot de
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19679