This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: possible small bug in g77 when writing direct access files
- From: Bud Davis <bdavis9659 at comcast dot net>
- To: gcc <gcc at gcc dot gnu dot org>
- Date: Thu, 04 Sep 2003 19:37:05 -0500
- Subject: RE: possible small bug in g77 when writing direct access files
Some more info, this from README.netlib:
--------------------------------------------------------------------------------------
Some buggy Fortran programs use unformatted direct I/O to write
an incomplete record and later read more from that record than
they have written. For records other than the last, the unwritten
portion of the record reads as binary zeros. The last record is
a special case: attempting to read more from it than was written
gives end-of-file -- which may help one find a bug. Some other
Fortran I/O libraries treat the last record no differently than
others and thus give no help in finding the bug of reading more
than was written. If you wish to have this behavior, compile
uio.c with -DPad_UDread .
--------------------------------------------------------------------------------------------------
It sounds like it is a feature(!), not a bug. The good news is you can
just
re-compile the run-time with the define set and get what you want (although
I think I would just change the code, it is no fun to require a
"special" version of
the compiler).
regards,
bud davis