This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fortran/PR19303 PATCH: Runtime selection of record markers for unformatted sequential io


the following patch implements the first steps towards the ability to
choose between various record marker schemes for unformatted
sequential I/O at runtime.

Some comments/usage instructions:

- It supports the gfortran way with no changes, i.e. the record marker
is of type gfc_offset, which is 64-bit on most platforms.

- g77 record markers should also work. It is implemented in the same
way as the gfortran format, but uses "long" instead of
gfc_offset. Thus on common 32-bit systems the record marker is a
32-bit integer.

- Support for HP format (see ) 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).

- Although the code is structured so that each unit may use a
different record marker format, currently the only way to change the
format is via a magic command line switch "-frecm", whose value can be
either "-frecm=g77" or "-frecm=hp" (the default format cannot be set
with this switch and is the same format as gfortran previously
used). It would be relatively straightforward to add an intrinsic to
change the default record marker type for new units, or maybe
implement it as an extra option to the OPEN statement.

Patch and Changelog attached.

Janne Blomqvist

Attachment: ChangeLog
Description: Text document

Attachment: usio.patch
Description: Text document

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]