This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: gfc_offset question (32 vs. 64 bits)
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: tobias dot schlueter at physik dot uni-muenchen dot de
- Cc: fortran at gcc dot gnu dot org
- Date: Tue, 14 Dec 2004 14:03:02 -0800 (PST)
- Subject: Re: gfc_offset question (32 vs. 64 bits)
> Steve Ellcey wrote:
> > Does libgfortran (or any other GCC library) offer a way to pass compiler
> > option information into a library so it could be used to change the
> > libraries behaviour? I guess one could invent a new interface to do
> > this, I was wondering if there was any existing precedence.
>
> The library reacts to a set of environment variables (see the code following
> line 427 in runtime/environ.c). Maybe we would like this to be setable at runtime.
>
> - Tobi
That certainly looks interesting. What do people think about an
environment variable to control this? gfc_offset would get set just
like it does now but you could set an environment variable
GFORTRAN_RECORD_OFFSET_SIZE to either 32 or 64. If gfc_offset were a 64
bit variable but GFORTRAN_RECORD_OFFSET_SIZE were set to 32 then we
would restrict the value to 32 bits and only write out 32 bits to the
unformatted sequential file. If GFORTRAN_RECORD_OFFSET_SIZE were set to
64 and sizeof (gfc_offset) is only 32 we would ignore it.
Steve Ellcey
sje@cup.hp.com