gfc_offset question (32 vs. 64 bits)

Steve Ellcey sje@cup.hp.com
Tue Dec 14 17:33:00 GMT 2004


While fixing a couple of bugs in the gfortran library involving IO
I noticed that gfc_offset is set to off_t (if off_t exists).  On the
platform I am running (ia64-hp-hpux11.23) this is a 64 bit value.

The FORTRAN compiler on this system currently defaults to using a 32 bit
value here so unformatted sequential files created by the two compilers
are incompatible.

I would like to have the GNU fortran compiler use a 32 bit gfc_offset on
this platform so it will be compatible with the system fortran compiler.
Does anyone have any advice on how this could/should be done?  I guess
the simplest way would be to put an ifdef in the libgfortran.h file.  Or
one could put something in the configure script that could set
gfc_offset based on the target OS/CPU.  Or one could have a config/cpu
directory like listdc++-v3 has.

Opinions?

Steve Ellcey
sje@cup.hp.com



More information about the Fortran mailing list