Insert padding for efficient use of cache.
SPARC:77 x86:77
This option inserts padding between arrays or character variables if they are static local and not initialized, or 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.
For -pad[=p], if p is present, it must be either (or both):
local |
Add padding between adjacent local variables |
common |
Add padding between variables in common blocks |
Defaults for -pad:
Without the -pad[=p] option, the compiler does no padding.
With -pad, but without the =p, the compiler does both local and common padding.
The following are equivalent:
f77 -pad any.f
f77 -pad=local,common any.f
f77 -pad=common,local any.f
f77 -pad=local -pad=common any.f
f77 -pad=common -pad=local any.f
The -pad[=p] option applies to items that satisfy the following criteria:
The items are arrays or character variables
The items are static local or in common blocks
For a definition of local or static variables, see -stackvar, "-stackvar".
Restrictions on -pad=common:
Neither the arrays nor the character strings are equivalenced
If -pad=common is specified for compiling a file that references a common block, it must be specified when compiling all files that reference that common block. The option changes the spacing of variables within the common block. If one program unit is compiled with the option and another is not, references to what should be the same location within the common block might reference different locations.
If -pad=common is specified, the declarations of common block variables in different program units must be the same except for the names of the variables.The amount of padding inserted between variables in a common block depends on the declarations of those variables. If the variables differ in size or rank in different program units, even within the same file, the locations of the variables might not be the same.
If -pad=common is specified, EQUIVALENCE declarations involving common block variables are flagged as an error.