From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5818 invoked by alias); 5 Nov 2005 22:21:23 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 5635 invoked by uid 48); 5 Nov 2005 22:21:19 -0000 Date: Sat, 05 Nov 2005 22:21:00 -0000 Message-ID: <20051105222119.5633.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/23815] Add -byteswapio flag In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "tkoenig at gcc dot gnu dot org" X-SW-Source: 2005-11/txt/msg00775.txt.bz2 List-Id: ------- 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