Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

align

Tells the compiler how to align certain data items.

Syntax

Linux:

-align [keyword[, keyword...]]

-noalign

macOS:

-align [keyword[, keyword...]]

-noalign

Windows:

/align[:keyword[, keyword...]]

/noalign

Arguments

keyword

Specifies the data items to align. Possible values are:

none

Prevents padding bytes anywhere in common blocks and structures.

arraynbyte

Specifies a starting boundary for arrays.

[no]commons

Affects alignment of common block entities.

[no]dcommons

Affects alignment of common block entities.

[no]qcommons

Affects alignment of common block entities.

[no]zcommons

Affects alignment of common block entities.

[no]records

Affects alignment of derived-type components and fields of record structures.

recnbyte

Specifies a size boundary for derived-type components and fields of record structures.

[no]sequence

Affects alignment of sequenced derived-type components.

all

Adds padding bytes whenever possible to data items in common blocks and structures.

Default

nocommons

Adds no padding bytes for alignment of common blocks.

nodcommmons

Adds no padding bytes for alignment of common blocks.

noqcommmons

Adds no padding bytes for alignment of common blocks.

nozcommmons

Adds no padding bytes for alignment of common blocks.

records

Aligns derived-type components and record structure fields on default natural boundaries.

nosequence

Causes derived-type components declared with the SEQUENCE statement to be packed, regardless of current alignment rules set by the user.

By default, no padding is added to common blocks but padding is added to structures.

Description

This option specifies the alignment to use for certain data items. The compiler adds padding bytes to perform the alignment.

Option

Description

align none

Tells the compiler not to add padding bytes anywhere in common blocks or structures. This is the same as specifying noalign.

align arraynbyte

Aligns the start of arrays on an n-byte boundary. n can be 8, 16, 32, 64, 128, or 256. The default value for n is 8. This affects the starting alignment for all arrays except for arrays in COMMON.

Arrays do not have padding between their elements.

align commons

Aligns all common block entities on natural boundaries up to 4 bytes, by adding padding bytes as needed.

The align nocommons option adds no padding to common blocks. In this case, unaligned data can occur unless the order of data items specified in the COMMON statement places the largest numeric data item first, followed by the next largest numeric data (and so on), followed by any character data.

align dcommons

Aligns all common block entities on natural boundaries up to 8 bytes, by adding padding bytes as needed.

The align nodcommons option adds no padding to common blocks.

align qcommons

Aligns all common block entities on natural boundaries up to 16 bytes, by adding padding bytes as needed.

The align noqcommons option adds no padding to common blocks.

IDE Equivalent

Visual Studio: Data > Structure Member Alignment (/align:recnbyte)

Data > Alignment of COMMON block entities (/align:[no]commons, /align:[no]dcommons, /align:[no]qcommons, /align:[no]zcommons)

Data > SEQUENCE Types Obey Alignment Rules (/align:[no]sequence)

Data > Default Array Alignment (/align:arraynbyte)

Alternate Options

align none

Linux and macOS: -noalign

Windows: /noalign

align records

Linux and macOS: -align rec16byte, -Zp16

Windows: /align:rec16byte, /Zp16

align norecords

Linux and macOS: -Zp1, -align rec1byte

Windows: /Zp1, /align:rec1byte

align recnbyte

Linux and macOS: -Zp{1|2|4|8|16}

Windows: /Zp{1|2|4|8|16}

align all

Linux and macOS: -align commons -align dcommons -align records -align nosequence

Windows: /align:nocommons,dcommons,records,nosequence