[Bug fortran/23815] Add -byteswapio flag
tkoenig at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Nov 5 22:21:00 GMT 2005
------- Comment #11 from tkoenig at gcc dot gnu dot org 2005-11-05 22:21 -------
OK, for the interface...
My suggestion would be to have three levels of supplying this value (ifort
has five or six :-)
First, an option to supply to the compiler. This could be
-fconvert=big_endian
-fconvert=little_endian
-fconvert=native (the default)
and maybe, at a later date,
-fconvert=vax_d
-fconvert=ibm_360.
This would be valid for all the units.
With this option alone, it would not be possible to write a conversion
program, so we need something else.
This could be overridden by a CONVERT="BIG_ENDIAN" etc. in the OPEN statement.
This, in turn, could be overridden by environment variables in the format
GFORTRAN_CONVERT_BIG_ENDIAN=10,20,30,40
GFORTRAN_CONVERT_LITTLE_ENDIAN=11,21,31,41
Agreed?
It would probably best to implement the compiler swith as selecting a
library at runtime. I'll leave that to a later date :-)
If anybody knows how to set an environment variable in a dejagnu
testcase, please tell :-)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23815
More information about the Gcc-bugs
mailing list