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

ID 767251
Date 11/07/2023
Public

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

Document Table of Contents

reentrancy

Tells the compiler to generate reentrant code to support a multithreaded application.

Syntax

Linux:

-reentrancy keyword

-noreentrancy

Windows:

/reentrancy:keyword

/noreentrancy

Arguments

keyword

Specifies details about the program. Possible values are:

none

Tells the runtime library (RTL) that the program does not rely on threaded or asynchronous reentrancy. The RTL will not guard against such interrupts inside its own critical regions. This is the same as specifying noreentrancy.

async

Tells the runtime library (RTL) that the program may contain asynchronous (AST) handlers that could call the RTL. This causes the RTL to guard against AST interrupts inside its own critical regions.

threaded

Tells the runtime library (RTL) that the program is multithreaded, such as programs using the POSIX threads library. This causes the RTL to use thread locking to guard its own critical regions.

Default

threaded

The compiler tells the runtime library (RTL) that the program is multithreaded.

Description

This option tells the compiler to generate reentrant code to support a multithreaded application.

If you do not specify a keyword for reentrancy, it is the same as specifying reentrancy threaded.

To ensure that a threadsafe and/or reentrant runtime library is linked and correctly initialized, option reentrancy threaded should also be used for the link step and for the compilation of the main routine.

Note that if option threads is specified, it sets option reentrancy threaded, since multithreaded code must be reentrant.

IDE Equivalent

Visual Studio: Code Generation > Generate Reentrant Code

Alternate Options

None

See Also