PR fortran/23815: Add byte-swapping to gfortran

Tobias.Schlueter@Physik.Uni-Muenchen.DE Tobias.Schlueter@Physik.Uni-Muenchen.DE
Wed Nov 16 21:07:00 GMT 2005


Quoting Richard Henderson <rth@redhat.com>:

> On Wed, Nov 16, 2005 at 09:45:15PM +0100, Thomas Koenig wrote:
> > I've put this into the documentation that KIND=10 probably won't work
> > with CONVERT.  This needs some more work.
>
> It should.  The real test case is ia64-linux (le) and ia64-hpux (be).
>
> Although I think we aborted the use of float types not in float,
> double, long double, which makes this impossible to test.

I'm not sure if this is the case for Fortran.  In trans-types.c:163 we have the
comment:

      /* Let the kind equal the precision divided by 8, rounding up.  Again,
	 this insulates the programmer from the underlying byte size.

	 Also, it effectively deals with IEEE extended formats.  There, the
	 total size of the type may equal 16, but it's got 6 bytes of padding
	 and the increased size can get in the way of a real IEEE quad format
	 which may also be supported by the target.

	 We round up so as to handle IA-64 __floatreg (RFmode), which is an
	 82 bit type.  Not to be confused with __float80 (XFmode), which is
	 an 80 bit type also supported by IA-64.  So XFmode should come out
	 to be kind=10, and RFmode should come out to be kind=11.  Egads.  */

So there should be support for kind=10.

- Tobi



More information about the Fortran mailing list