Bug#369547: gfortran: strange behaviour in unformatted writing
Package: gfortran
Version: 4:4.0.3-4
Severity: grave
Justification: renders package unusable
I'm not sure this is a bug but I could not find any documentation of
this anomalous behaviuor.
Below you find two programs:
qaz.f
zaq.f
qaz.f writes 3 integers in un unformatted file
zaq.f reads three integers from the file
if both qaz.f and zaq.f are compiled with gfortran, everithing seems to
work, however:
- the file is 28 bytes while I expected it to be 20 bytes:
4 bytes per integer + EOR + EOF (in fact 20 bytes is what g77
or ifort writes)
- if I write the file using a gfortran compiled version ov qaz.f
and read with a g77 o ifort compiled verison of zaq.f, I
obtain
i=0 j=1 k=2
instead of
i=1 j=2 k=3
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16
Locale: LANG=it_IT@euro, LC_CTYPE=it_IT@euro (charmap=ISO-8859-15)
Versions of packages gfortran depends on:
ii cpp 4:4.0.3-4 The GNU C preprocessor (cpp)
ii gcc 4:4.0.3-4 The GNU C compiler
ii gfortran-4.0 4.0.3-3 The GNU Fortran 95 compiler
gfortran recommends no packages.
-- no debconf information
Reply to: