Print

Print


Tim Prince wrote:

> Doesn't SEQUENCE mean no padding?
I took a look at the standard and I am not really sure what exactly what
it says. Looking at the Intel Fortran manual I see connections to the
statement above. They have an option "-align sequence" which allows
padding in sequence types, but the default is not to add padding for
SEQUENCE types (but do add padding for normal types, i.e., align all
components on natural boundaries). The manual also says that specifying
the "-stand" option (standard conformance) disables  "-align sequence".
I am not sure why? For SEQUENCE types composed only of default integer
and single or double precision it may be that sequence association
rules prohibit padding. So this may be why.

The reason I add sequence is to insure that the order of the components
is not changed (as mandated by the C standard). But I am under the
impression that no compiler, at least on IA32, actually rearranges the
order of components in derived types. Why---this seems like such a
great thing to do (rearrange and *then* pad to align on natural
boundaries). Does someone know otherwise?

Thanks,
Aleksandar