This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

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


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