[Bug libfortran/19872] New: closed and re-opened file not overwriten

bdavis at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Feb 10 15:37:00 GMT 2005


program wtest
      implicit none
      open(1,file='wtest.out')
      write(1,'("1 2 3 4 5 6 7 8 9")')
      close(1)
      open(1,file='wtest.out')
      write(1,'("9 8 7 6")')
      close(1)
      end


[bdavis@localhost gfortran]$ gfc a.f
[bdavis@localhost gfortran]$ ./a.out
[bdavis@localhost gfortran]$ cat wtest.out
9 8 7 6
1 2 3 4 5 6 7 8 9
[bdavis@localhost gfortran]$ g77 a.f
[bdavis@localhost gfortran]$ ./a.out
[bdavis@localhost gfortran]$ cat wtest.out
9 8 7 6

-- 
           Summary: closed and re-opened file not overwriten
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libfortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bdavis at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list