------- Additional Comments From aa056 at chebucto dot ns dot ca 2005-06-04
18:44 -------
For Red Hat Fedora Core 3, gfortran 4.0.0 doesn't lose output records:
$ ./chk-write-many
uname -a
Linux cerberus.cwmannwn.nowhere 2.6.11-1.14_FC3.stk16 #1 Tue Apr 12 14:39:51 EDT
2005 i686 i686 i386 GNU/Linux
cat - <<EOF >write-many.f
cat write-many.f
program main
* open(10,status='SCRATCH')
a = 0.3858204
do i=1,1000000
a = a + 0.4761748164
write(*, '(G12.5)') a
end do
end
gfortran -v
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --with-gxx-include-dir=/usr/include/c++/3.4.3
--enable-languages=c,c++,f95 --disable-libgcj --host=i386-redhat-linux
Thread model: posix
gcc version 4.0.0 20050406 (Red Hat 4.0.0-0.41.fc3)
gfortran write-many.f
time ./a.out > wm-gfortran.out
real 0m22.993s
user 0m11.641s
sys 0m0.062s
g77 write-many.f
time ./a.out > wm-g77.out
real 0m7.477s
user 0m4.036s
sys 0m0.045s
cmp wm-*.out
wm-g77.out wm-gfortran.out differ: byte 134818, line 10371
I think the differences are rounding errors.
$ wc -l wm*.out
1000000 wm-g77.out
1000000 wm-gfortran.out
2000000 total
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20278