This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/19872] New: closed and re-opened file not overwriten
- From: "bdavis at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Feb 2005 09:56:20 -0000
- Subject: [Bug libfortran/19872] New: closed and re-opened file not overwriten
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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