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

General Rules for Compiler Options

This section describes general rules for compiler options and it contains information about how we refer to compiler option names in descriptions.

General Rules for Compiler Options

Compiler options may be case sensitive, and may have different meanings depending on their case. For example, option c prevents linking, but option C checks for certain conditions at runtime.

Options specified on the command line apply to all files named on the command line.

Options can take arguments in the form of file names, strings, letters, or numbers. If a string includes spaces, the string must be enclosed in quotation marks.

Compiler options can appear in any order.

Unless you specify certain options, the command line will both compile and link the files you specify.

You can abbreviate some option names, entering as many characters as are needed to uniquely identify the option.

Certain options accept one or more keyword arguments following the option name. For example, architecture option x option accepts several keywords.

To specify multiple keywords, you typically specify the option multiple times.

To disable an option, specify the negative form of the option if one exists.

If there are enabling and disabling versions of an option on the command line, the last one on the command line takes precedence.

Compiler options remain in effect for the whole compilation unless overridden by a compiler directive.

Linux and macOS

You cannot combine options with a single dash. For example, this form is incorrect: -Ec; this form is correct: -E -c

Windows

You cannot combine options with a single slash. For example: This form is incorrect: /Ec; this form is correct: /E /c

All compiler options must precede /link options, if any, on the command line.

Compiler options remain in effect for the whole compilation unless overridden by a compiler directive.

NOTE:

You can sometimes use a comma to separate keywords. For example, the following is valid:

ifort /warn:usage,declarations test.f90

On these systems, you can use an equals sign (=) instead of the colon:

ifort /warn=usage,declarations test.f90

You can disable one or more optimization options by specifying option /Od last on the command line.

NOTE:

The /Od option is part of a mutually-exclusive group of options that includes /Od, /O1, /O2, /O3, and /Ox. The last of any of these options specified on the command line will override the previous options from this group.

How We Refer to Compiler Option Names in Descriptions

Within documentation, compiler option names that are very different are spelled out in full.

However, many compiler option names are very similar except for initial characters. For these options, we use the following shortcuts when referencing their names in descriptions:

  • No initial – or /

    This shortcut is used for option names that are the same for Linux and Windows except for the initial character.

    For example, Fa denotes:

    • Linux and macOS: -Fa

    • Windows: /Fa

  • [Q]option-name

    This shortcut is used for option names that only differ because the Windows form starts with a Q.

    For example, [Q]ipo denotes:

    • Linux and macOS: -ipo

    • Windows: /Qipo

  • [q or Q]option-name

    This shortcut is used for option names that only differ because the Linux form starts with a q and the Windows form starts with a Q.

    For example, [q or Q]opt-report denotes:

    • Linux and macOS: -qopt-report

    • Windows: /Qopt-report