This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

writing over an existing file




The following code

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

compiled with:

gfortran -ffree-form -O3 wtest.f -o wtest
puts in file wtest.out the following content:

9 8 7 6
5 6 7 8 9

whereas
g77 -ffree-form -O3 wtest.f -o wtest
yields

9 8 7 6

as it should.

Weird...

This is using the Linux binaries.

Philippe Depondt                                    dep@ccr.jussieu.fr
# INSP                             Institut des Nano-Sciences de Paris
# Universite P. et M. Curie, Casier 86, 140 rue de Lourmel 75015 Paris
# Site Boucicaut : Bat. 2, 1er etage piece 4       Tel: 01 44 27 42 33


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