[MPI3 Fortran] Results of San Jose Forum meeting
N.M. Maclaren
nmm1 at cam.ac.uk
Sat Mar 13 04:13:01 CST 2010
On Mar 12 2010, Rolf Rabenseifner wrote:
>
> I want to cite
> http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=/com.ibm.xlf101a.doc/xlflr/derivedtypes.htm
You would be better off citing the Fortran standard directly.
>I hope that these citations are correct in relation to the official
>Fortran 2003 standard.
Probably. I haven't checked them.
>Based on this, the original INTEGER handles and the proposed
>derived sequence type with default integer and without any bind(c)
>have exactly the same content and storage association.
You have misunderstood the specification. In particular, there is
no requirement for the alignment rules to be the same for most of
those, and they quite often aren't.
In particular, unless there is a way IN CONFORMING FORTRAN that you
can access a variable of one type as the other, there is no requirement
for the compiler to treat them identically. And there isn't.
If you want to experiment, I recommend playing around with structures
of the form:
struct {int x; float y; double z;}
and:
TYPE :: Fred
SEQUENCE
INTEGER :: x
REAL :: y
DOUBLE PRECISION :: z
END TYPE Fred
You may be surprised by what you find :-)
Regards,
Nick Maclaren.
More information about the mpiwg-fortran
mailing list