(j3.2006) Storage sequence and alignment

Rasmussen, Craig E rasmussn
Wed Sep 28 17:27:11 EDT 2011

On Sep 28, 2011, at 2:45 PM, Bill Long wrote:

Someone please tell me I'm wrong and that all legal Fortran programs are
good programs.

Keith was able to stop laughing sooner than I was, so beat me to the
obvious reply for this line.

I'm happy to hear I've lightened (if not enlightened) your day :-)

I don't see any mention of a requirement that the storage sequences be
packed in memory.  There are some places where "contiguous" storage is
required - characters in a len > 1 character variable, elements in an
array, the two numeric storage units for double precision, and the real
and imaginary parts of complex.    But "contiguous" is not part of the
requirements for a sequence type, and I believe this is very deliberate.
The term "sequence" implies an ordering, but does not automatically also
imply "contiguous".

I think this is the guidance we are looking for and I expect that compilers handle the "contiguity"  of sequence types differently.  The Intel compiler gives a warning about alignment so I expect it is not providing padding and so thus them contiguous, otherwise no need for a warning.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://j3-fortran.org/pipermail/j3/attachments/20110928/0f2e9f5c/attachment.html>

More information about the J3 mailing list