Sun Studio 12: Fortran User's Guide

3.4.2 –aligncommon[={1|2|4|8|16}]

Specify the alignment of data in common blocks and standard numeric sequence types.

The value indicates the maximum alignment (in bytes) for data elements within common blocks and standard numeric sequence types.


Note –

A standard numeric sequence type is a derived type containing a SEQUENCE statement and only default component data types ( INTEGER, REAL, DOUBLEPRECISION, COMPLEX without KIND= or * size) . Any other type, such as REAL*8, will make the type non-standard.


For example, -aligncommon=4 would align data elements with natural alignments of 4 bytes or more on 4-byte boundaries.

This option does not affect data with natural alignment smaller than the specified size.

Without -aligncommon, the compiler aligns elements in common blocks and numeric sequence types on (at most) 4-byte boundaries.

Specifying -aligncommon without a value defaults to 1 - all common block and numeric sequence type elements align on byte boundaries (no padding between elements).

-aligncommon=16 reverts to -aligncommon=8 on platforms that are not 64-bit enabled.