auto

Causes all local, non-SAVEd variables to be allocated to the run-time stack.

IDE Equivalent

Windows: Data > Local Variable Storage

Linux: None

Mac OS X: None

Architectures

IA-32, Intel® 64 architectures

Syntax

Linux and Mac OS X:

-auto

-noauto

Windows:

/auto

/noauto

Arguments

None

Default

-auto-scalar
or /Qauto-scalar

Scalar variables of intrinsic types INTEGER, REAL, COMPLEX, and LOGICAL are allocated to the run-time stack. Note that the default changes to auto if one of the following options are specified:recursive, -openmp (Linux and Mac OS X), or /Qopenmp (Windows).

Description

This option places local variables (scalars and arrays of all types), except those declared as SAVE, on the run-time stack. It is as if the variables were declared with the AUTOMATIC attribute.

It does not affect variables that have the SAVE attribute or ALLOCATABLE attribute, or variables that appear in an EQUIVALENCE statement or in a common block.

This option may provide a performance gain for your program, but if your program depends on variables having the same value as the last time the routine was invoked, your program may not function properly.

If you want to cause variables to be placed in static memory, specify option -save (Linux and Mac OS X) or /Qsave (Windows). If you want only scalar variables of certain intrinsic types to be placed on the run-time stack, specify option auto-scalar.

Note iconNote

On Windows NT* systems, there is a performance penalty for addressing a stack frame that is too large. This penalty may be incurred with /auto, /Qauto, or /automatic, because arrays are allocated on the stack along with scalars. However, with /Qauto-scalar, you would have to have more than 32K bytes of local scalar variables before you incurred the performance penalty. /Qauto-scalar enables the compiler to make better choices about which variables should be kept in registers during program execution.

Alternate Options

auto

Linux and Mac OS X: -automatic (this is a deprecated option)

Windows: /automatic (this is a deprecated option), /Qauto, /4Ya

noauto

Linux and Mac OS X: -save, -noautomatic(this is a deprecated option)

Windows: /Qsave, /noautomatic (this is a deprecated option), /4Na

See Also


Submit feedback on this help topic

Copyright © 1996-2010, Intel Corporation. All rights reserved.