Dear Jerry, dear Steve,
It's me again, this time about a patch against another Fortran file IO bug
found in the newest release gcc-4.1.2.
The program I am working on reads a previously created sequential
unformatted file. It reads the file record by record searching for a
specific contents. The records have different lengths and they are sometimes
shorter than the array they are read to. The algorithm worked fine under
gfortran-4.1.1. But gfortran-4.1.2 introduced a new kind of error:
ERROR_SHORT_RECORD whose condition was simply ignored by gfortran-4.1.1. The
existence of this new feature itself is not a problem at all. But just after
ERROR_SHORT_RECORD libgfortran gets out of sync, looses the record markers
and gives an end-of-file condition on all subsequent reads although there
should be a lot of further records present.
I have reduced the test to a small demo program.