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]

g77: read/write file access


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

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