Sun Studio 12: Fortran User's Guide

3.4.81 –pad[=p]

Insert padding for efficient use of cache.

This option inserts padding between arrays or character variables, if they are static local and not initialized, or if they are in common blocks. The extra padding positions the data to make better use of cache. In either case, the arrays or character variables can not be equivalenced.

p, if present, must be either %none or either (or both) local or common:


Add padding between adjacent local variables.


Add padding between variables in common blocks. 


Do not add padding. (Compiler default.) 

If both local and common are specified, they can appear in any order.

Defaults for -pad:

The -pad[=p] option applies to items that satisfy the following criteria:

For a definition of local or static variables, see 3.4.96 –stackvar.

The program must conform to the following restrictions:

It is the programmer’s responsibility to make sure that common blocks are compiled consistently when -pad is used. Common blocks appearing in different program units that are compiled inconsistently with -pad=common will cause errors. Compiling with -Xlist will report when common blocks with the same name have different lengths in different program units.