This document catalogs the options processed by F18's peers/competitors. Much of the document is taken up by a set of tables that list the options categorized into different topics. Some of the table headings link to more information about the contents of the tables. For example, the table on Standards conformance options links to <a href=#standards">notes on Standards conformance.
There's also important information in the Appendix section near the end of the document on how this data was gathered and what is and is not included in this document.
Note that compilers may support language features without having an option for them. Such cases are frequently, but not always noted in this document.
All conformance options are similar -- they issue warnings if non-standard features are used. All defaults are to allow extensions without warnings. The GNU, IBM, and Intel compilers allow multiple standard levels to be specified.
Fixed or free source: Cray, IBM, and Intel default the source format based on the source file suffix as follows:
IBM Fortran's options allow the source line length to be specified with the option, e.g., “-qfixed=72”. IBM bases the default on the name of the command used to invoke the compiler. IBM has 16 different commands that invoke the Fortran compiler, and the default use of free or fixed format and the line length are based on the command name. -qfixed=72 is the default for the xlf, xlf_r, f77, and fort77 commands. -qfree=f90is the default for the f90, xlf90, xlf90_r, f95, xlf95, xlf95_r, f2003, xlf2003, xlf2003_r, f2008, xlf2008, and xlf2008_r commands. The maximum line length for either source format is 132 characters.
Column 1 comment specifier: All compilers allow “D” in column 1 to specify that the line contains a comment and have this as the default for fixed format source. IBM also supports an “X” in column 1 with the option “-qxlines”.
Source line length:
Names, Literals, and other tokens
Escapes in literals:
“$” in symbol names: Allowing “$” in names is controlled by an option in GNU and is the default behavior in IBM and Intel. Presumably, these compilers issue warnings when standard conformance options are enabled. Dollar signs in names don't seem to be allowed in Cray, PGI, or Flang.
One trip:
REAL, DOUBLE PRECISION, and COMPLEX Data
These size options affect the sizes of variables, literals, and intrinsic function results.
Default REAL sizes: These options do not affect the size of explicitly declared data (for example, REAL(KIND=4).
Default DOUBLE PRECISION: These options allow control of the size of DOUBLE PRECISION types in conjunction with controlling REAL types.
Promote or demote REAL type sizes: These options change the meaning of data types specified by declarations of the form REAL(KIND=N), except, perhaps for PGI.
These size options affect the sizes of variables, literals, and intrinsic function results.
Default INTEGER sizes: For all compilers, these options affect both INTEGER and LOGICAL types.
Enable 8 and 16 bit INTEGER and LOGICAL: This Cray option (“-eh”) enables support for 8-bit and 16-bit INTEGER and LOGICAL types that use explicit kind or star values. By default (“-eh”), data objects declared as INTEGER(kind=1) or LOGICAL(kind=1) are 8 bits long, and objects declared as INTEGER(kind=2) or LOGICAL(kind=2) are 16 bits long. When this option is disabled (“-dh”), data objects declared as INTEGER(kind=1), INTEGER(kind=2), LOGICAL(kind=1), or LOGICAL(kind=2) are 32 bits long.
Intrinsic functions
GNU is the only compiler with options governing the use of non-standard intrinsics. For more information on the GNU options, see here. All compilers implement non-standard intrinsics but don't have options that affect access to them.
Contiguous array pointers: All vendors that implement this option (Cray, IBM, and Intel) seem to have apply to all pointer targets. Assuming that the arrays that are targeted by the pointers allows greater optimization.
Contiguous assumed shape dummy arguments: Cray and Intel have a separate argument that's specific to assumed shape dummy arguments.
Disable call site checking: This Cray option (“-dC”) disables some types of standard call site checking. The current Fortran standard requires that the number and types of arguments must agree between the caller and callee. These constraints are enforced in cases where the compiler can detect them, however, specifying “-dC” disables some of this error checking, which may be necessary in order to get some older Fortran codes to compile. If error checking is disabled, unexpected compile-time or run time results may occur. The compiler by default attempts to detect situations in which an interface block should be specified but is not. Specifying “-dC” disables this type of checking as well.
Warn for bad call checking: This Cray option (“-eb”) issues a warning message rather than an error message when the compiler detects a call to a procedure with one or more dummy arguments having the TARGET, VOLATILE or ASYNCHRONOUS attribute and there is not an explicit interface definition.
This document focuses on options relevant to the Fortran language definition. This includes some features (such as recursion) that are only indirectly related to the Fortran language definition. Options related to the following areas are not included:
Here's the list of compilers surveyed, hot linked to the source of data on it. Note that this is the only mention of the Oracle and NAG compilers in this document.
This document has been kept relatively small by providing links to much of the information about options rather than duplicating that information. For IBM, Intel, and some PGI options, there are direct links. But direct links were not possible for Cray, GNU and some PGI options.
Many compilers have options that can either be enabled or disabled. Some compilers indicate this by the presence or absence of the letters “no” in the option name (IBM, Intel, and PGI) while Cray precedes many options with either “e” for enabled or “d” for disabled. This document only includes the enabled version of the option specification.
Deprecated options were generally ignored, even though they were documented.