Oracle® Solaris Studio 12.4: Fortran User's Guide

Exit Print View

Updated: March 2015
 
 

3.4.1 –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.

Do not use -aligncommon=1 with -xmemalign as these declarations will conflict and could cause a segmentation fault on some platforms and configurations.

Using —aligncommon=1 on SPARC platforms might result in a bus error due to misalignment, requiring an appropriate choice of the —xmemalign option be used. Depending on the application, —xmemalign=1s, —xmemalign=4i, or —xmemalign=8i should give optimal performance while avoiding the segmentation fault.

See also —xmemalign