This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fortran/PR19303 PATCH: Runtime selection of record markers forunformatted sequential io
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: Janne Blomqvist <jblomqvi at cc dot hut dot fi>
- Cc: GNU GFortran <fortran at gcc dot gnu dot org>,GCC patches <gcc-patches at gcc dot gnu dot org>, sje at cup dot hp dot com
- Date: Mon, 21 Feb 2005 17:52:59 +0100
- Subject: Re: Fortran/PR19303 PATCH: Runtime selection of record markers forunformatted sequential io
- References: <20050218233325.GA7014@vipunen.hut.fi>
(adding Steve Ellcey to CC. Can you point us to some documentation of HP's
record format?)
Janne Blomqvist wrote:
> - Support for HP format (see
> http://gcc.gnu.org/ml/fortran/2004-12/msg00142.html ) is not
> implemented completely nor correctly, since I can't figure out how it
> is supposed to work at all without very poor performance (see comments
> in source).
I wonder if this format is documented someplace. The only documenation I
could find clearly states something different from what Steve said:
From
<http://h18009.www1.hp.com/fortran/docs/vms-um/dfumio.htm#vms_sec_record_types>
--------------
Variable-length records can contain any number of bytes, up to a specified
maximum. These records are prefixed by a count field, indicating the number of
bytes in the record. The count field comprises two bytes on a disk device and
four bytes on magnetic tape. The value stored in the count field indicates the
number of data bytes in the record.
--------------
That aside I would also be surprised if HP actually set the whole 32 bits to 1
instead of simply setting the sign-bit and indicating that this is 64 bit
record that way (i.e. if (reclen && 0x80000000 == 0) length = reclen; else
length = (reclen && 0x7FFFFFFF) << 32 + the_32_bits_following_reclen;) , but
without documentation or a HP compiler to try out, this is of course idle
speculation, and it wouldn't solve your performance problem wither :-(
- Tobi