g77: read/write file access
Thomas Henlich
henlich@mmers1.mw.tu-dresden.de
Mon Jan 8 07:58:00 GMT 2001
I noticed the following bug in g77 (gcc-2.95,2, DOS/djgpp and Windows
NT/mingw32 ports):
The following program does not work as expected:
===
program test
integer un
un = 11
open (un, file='test.txt')
read (un, *)
write (un, '(A)') '2'
close (un)
end
===
If the file test.txt consists of the 2 lines:
===
one
two
===
it should look like this after running the program 'test':
===
one
2
===
instead it is:
===
one
t
===
--
Thomas Henlich
More information about the Gcc-bugs
mailing list