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

ID 767251
Date 9/08/2022
Public

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

Document Table of Contents

check

Checks for certain conditions at run time.

Syntax

Linux:

-check [keyword[, keyword...]]

-nocheck

macOS:

-check [keyword[, keyword...]]

-nocheck

Windows:

/check[:keyword[, keyword...]]

/nocheck

Arguments

keyword

Specifies the conditions to check. Possible values are:

none

Disables all check options.

[no]arg_temp_created

Determines whether checking occurs for actual arguments copied into temporary storage before routine calls.

[no]assume

Determines whether checking occurs to test that the scalar-Boolean-expression in the ASSUME directive is true, or that the addresses in the ASSUME_ALIGNED directive are aligned on the specified byte boundaries.

[no]bounds

Determines whether checking occurs for array subscript and character substring expressions.

[no]contiguous

Determines whether the compiler checks pointer contiguity at pointer-assignment time.

[no]format

Determines whether checking occurs for the data type of an item being formatted for output.

[no]output_conversion

Determines whether checking occurs for the fit of data items within a designated format descriptor field.

[no]pointers

Determines whether checking occurs for certain disassociated or uninitialized pointers or unallocated allocatable objects.

[no]shape

Determines whether array conformance checking is performed.

[no]stack

Determines whether checking occurs on the stack frame.

[no]teams

Determines whether the run-time system diagnoses non-standard coarray team usage.

[no]udio_iostat

Determines whether conformance checking occurs when user-defined derived type input/output routines are executed.

[no]uninit

Determines whether checking occurs for uninitialized variables.

all

Enables all check options.

Default

nocheck

No checking is performed for run-time failures. Note that if option vms is specified, the defaults are check format and check output_conversion.

Description

This option checks for certain conditions at run time.

Option

Description

check none

Disables all check options (same as nocheck).

check arg_temp_created

Enables run-time checking on whether actual arguments are copied into temporary storage before routine calls. If a copy is made at run-time, an informative message is displayed.

check assume

Enables run-time checking on whether the scalar-Boolean-expression in the ASSUME directive is true and that the addresses in the ASSUME_ALIGNED directive are aligned on the specified byte boundaries. If the test is .FALSE., a run-time error is reported and the execution terminates.

check bounds

Enables compile-time and run-time checking for array subscript and character substring expressions. An error is reported if the expression is outside the dimension of the array or the length of the string.

For array bounds, each individual dimension is checked. For arrays that are dummy arguments, only the lower bound is checked for a dimension whose upper bound is specified as * or where the upper and lower bounds are both 1.

For some intrinsics that specify a DIM= dimension argument, such as LBOUND, an error is reported if the specified dimension is outside the declared rank of the array being operated upon.

Once the program is debugged, omit this option to reduce executable program size and slightly improve run-time performance.

It is recommended that you do bounds checking on unoptimized code. If you use option check bounds on optimized code, it may produce misleading messages because registers (not memory locations) are used for bounds values.

check contiguous

Tells the compiler to check pointer contiguity at pointer-assignment time. This will help prevent programming errors such as assigning contiguous pointers to non-contiguous objects.

To get more detailed location information about where an error occurred, use option traceback.

IDE Equivalent

Visual Studio: Run-time > Runtime Error Checking (/nocheck, /check:all)

Run-time > Check Array and String Bounds (/check:bounds)

Run-time > Check Uninitialized Variables (/check:uninit)

Run-time > Check Edit Descriptor Data Type (/check:format)

Run-time > Check Edit Descriptor Data Size (/check:output_conversion)

Run-time > Check For Actual Arguments Using Temporary Storage (/check:arg_temp_created)

Run-time > Check Array Conformance (/check:shape)

Run-time > Check For Null Pointers and Allocatable Array References (/check:pointers)

Alternate Options

check none

Linux and macOS: -nocheck

Windows: /nocheck

check bounds

Linux and macOS: -CB

Windows: /CB

check shape

Linux and macOS: -CS

Windows: /CS

check uninit

Linux and macOS: -CU

Windows: /RTCu, /CU

check all

Linux and macOS: -check, -C

Windows: /check, /C

See Also