Fortran 77 front end included in GCC prior to version 4 (released in
2005). While it is backward-compatible with most @command{g77}
extensions and command-line options, @command{gfortran} is a completely new
-implemention designed to support more modern dialects of Fortran.
+implementation designed to support more modern dialects of Fortran.
GNU Fortran implements the Fortran 77, 90 and 95 standards
completely, most of the Fortran 2003 and 2008 standards, and some
features from the 2018 standard. It also implements several extensions
setting a default data representation for the whole program. The
@code{CONVERT} specifier overrides the @option{-fconvert} compile options.
-@emph{Note that the values specified via the GFORTRAN_CONVERT_UNIT
-environment variable will override the CONVERT specifier in the
-open statement}. This is to give control over data formats to
+Note that the values specified via the @env{GFORTRAN_CONVERT_UNIT}
+environment variable will override the @code{CONVERT} specifier in the
+@code{OPEN} statement. This is to give control over data formats to
users who do not have the source code of their program available.
@node GFORTRAN_ERROR_BACKTRACE
@node KIND Type Parameters
-@section KIND Type Parameters
+@section @code{KIND} Type Parameters
@cindex kind
The @code{KIND} type parameters supported by GNU Fortran for the primitive
@node Internal representation of LOGICAL variables
-@section Internal representation of LOGICAL variables
+@section Internal representation of @code{LOGICAL} variables
@cindex logical, variable representation
The Fortran standard does not specify how variables of @code{LOGICAL}
@node MAX and MIN intrinsics with REAL NaN arguments
-@section MAX and MIN intrinsics with REAL NaN arguments
+@section @code{MAX} and @code{MIN} intrinsics with @code{REAL} NaN arguments
@cindex MAX, MIN, NaN
The Fortran standard does not specify what the result of the
low level file descriptor corresponding to an open Fortran unit. Then,
using e.g. the @code{ISO_C_BINDING} feature, one can call the
underlying system call to flush dirty data to stable storage, such as
-@code{fsync} on POSIX, @code{_commit} on MingW, or @code{fcntl(fd,
+@code{fsync} on POSIX, @code{_commit} on MinGW, or @code{fcntl(fd,
F_FULLSYNC, 0)} on macOS. The following example shows how to call
fsync:
@node Files opened without an explicit ACTION= specifier
-@section Files opened without an explicit ACTION= specifier
+@section Files opened without an explicit @code{ACTION=} specifier
@cindex open, action
The Fortran standard says that if an @code{OPEN} statement is executed
@itemize
-@item Results of INQUIRE statements of the ``inquire by file'' form will
+@item Results of @code{INQUIRE} statements of the ``inquire by file'' form
relate to the target of the symbolic link. For example,
@code{INQUIRE(FILE="foo",EXIST=ex)} will set @var{ex} to @var{.true.} if
@var{foo} is a symbolic link pointing to an existing file, and @var{.false.}
by the user program, and a trailing record marker. The record markers
are four-byte integers by default, and eight-byte integers if the
@option{-fmax-subrecord-length=8} option (which exists for backwards
-compability only) is in effect.
+compatibility only) is in effect.
The representation of the record markers is that of unformatted files
given with the @option{-fconvert} option, the @ref{CONVERT specifier}
-in an open statement or the @ref{GFORTRAN_CONVERT_UNIT} environment
+in an @code{OPEN} statement or the @ref{GFORTRAN_CONVERT_UNIT} environment
variable.
The maximum number of bytes of user data in a subrecord is 2147483639
* X format descriptor without count field::
* Commas in FORMAT specifications::
* Missing period in FORMAT specifications::
-* Default widths for F@comma{} G and I format descriptors::
+* Default widths for F/G/I format descriptors::
* I/O item lists::
-* @code{Q} exponent-letter::
+* Q exponent-letter::
* BOZ literal constants::
* Real array indices::
* Unary operators::
GNU Fortran allows old-style kind specifications in declarations. These
look like:
@smallexample
- TYPESPEC*size x,y,z
+ TYPESPEC*@var{size} x,y,z
@end smallexample
@noindent
where @code{TYPESPEC} is a basic type (@code{INTEGER}, @code{REAL},
-etc.), and where @code{size} is a byte count corresponding to the
+etc.), and where @var{size} is a byte count corresponding to the
storage size of a valid kind for that type. (For @code{COMPLEX}
-variables, @code{size} is the total size of the real and imaginary
+variables, @var{size} is the total size of the real and imaginary
parts.) The statement then declares @code{x}, @code{y} and @code{z} to
be of type @code{TYPESPEC} with the appropriate kind. This is
equivalent to the standard-conforming declaration
variable immediately preceding the initialization. In other words,
something like @code{INTEGER I,J/2,3/} is not valid. This style of
initialization is only allowed in declarations without double colons
-(@code{::}); the double colons were introduced in Fortran 90, which also
+(@samp{::}); the double colons were introduced in Fortran 90, which also
introduced a standard syntax for initializing variables in type
declarations.
including array qualifiers, substrings and fully qualified derived types.
The output from a namelist write is compatible with namelist read. The
output has all names in upper case and indentation to column 1 after the
-namelist name. Two extensions are permitted:
+namelist name. The following extensions are permitted:
+@itemize @bullet
+
+@item
Old-style use of @samp{$} instead of @samp{&}
@smallexample
$MYNML
It should be noted that the default terminator is @samp{/} rather than
@samp{&END}.
+@item
Querying of the namelist when inputting from stdin. After at least
one space, entering @samp{?} sends to stdout the namelist name and the names of
the variables in the namelist:
To aid this dialog, when input is from stdin, errors send their
messages to stderr and execution continues, even if @code{IOSTAT} is set.
+@item
@code{PRINT} namelist is permitted. This causes an error if
@option{-std=f95} is used.
@smallexample
END PROGRAM test_print
@end smallexample
+@item
Expanded namelist reads are permitted. This causes an error if
@option{-std=f95} is used. In the following example, the first element
of the array will be given the value 0.00 and the two succeeding
X(1,1) = 0.00 , 1.00 , 2.00
/
@end smallexample
+@end itemize
When writing a namelist, if no @code{DELIM=} is specified, by default a
-double quote is used to delimit character strings. If -std=F95, F2003,
-or F2008, etc, the delim status is set to 'none'. Defaulting to
+double quote is used to delimit character strings. With @option{-std=f95}
+or later, the delim status is set to @code{'none'}. Defaulting to
quotes ensures that namelists with character strings can be subsequently
read back in accurately.
10 FORMAT ('F4')
@end smallexample
-@node Default widths for F@comma{} G and I format descriptors
-@subsection Default widths for @code{F}, @code{G} and @code{I} format descriptors
+@node Default widths for F/G/I format descriptors
+@subsection Default widths for @samp{F}, @samp{G} and @samp{I} format descriptors
To support legacy codes, GNU Fortran allows width to be omitted from format
specifications if and only if @option{-fdec-format-defaults} is given on the
of the @code{READ} statement, and the output item lists of the
@code{WRITE} and @code{PRINT} statements, to start with a comma.
-@node @code{Q} exponent-letter
-@subsection @code{Q} exponent-letter
-@cindex @code{Q} exponent-letter
+@node Q exponent-letter
+@subsection @samp{Q} exponent-letter
+@cindex @samp{Q} exponent-letter
GNU Fortran accepts real literal constants with an exponent-letter
-of @code{Q}, for example, @code{1.23Q45}. The constant is interpreted
+of @samp{Q}, for example, @code{1.23Q45}. The constant is interpreted
as a @code{REAL(16)} entity on targets that support this type. If
the target does not support @code{REAL(16)} but has a @code{REAL(10)}
type, then the real-literal-constant will be interpreted as a
@subsection BOZ literal constants
@cindex BOZ literal constants
-Besides decimal constants, Fortran also supports binary (@code{b}),
-octal (@code{o}) and hexadecimal (@code{z}) integer constants. The
+Besides decimal constants, Fortran also supports binary (@samp{b}),
+octal (@samp{o}) and hexadecimal (@samp{z}) integer constants. The
syntax is: @samp{prefix quote digits quote}, where the prefix is
-either @code{b}, @code{o} or @code{z}, quote is either @code{'} or
-@code{"} and the digits are @code{0} or @code{1} for binary,
+either @samp{b}, @samp{o} or @samp{z}, quote is either @samp{'} or
+@samp{"} and the digits are @code{0} or @code{1} for binary,
between @code{0} and @code{7} for octal, and between @code{0} and
@code{F} for hexadecimal. (Example: @code{b'01011101'}.)
dependent. Gfortran interprets the sign bit as a user would expect.
As a deprecated extension, GNU Fortran allows hexadecimal BOZ literal
-constants to be specified using the @code{X} prefix. That the BOZ literal
+constants to be specified using the @samp{X} prefix. That the BOZ literal
constant can also be specified by adding a suffix to the string, for
example, @code{Z'ABC'} and @code{'ABC'X} are equivalent. Additionally,
as extension, BOZ literals are permitted in some contexts outside of
Cray pointers are part of a non-standard extension that provides a
C-like pointer in Fortran. This is accomplished through a pair of
-variables: an integer "pointer" that holds a memory address, and a
-"pointee" that is used to dereference the pointer.
+variables: an integer ``pointer'' that holds a memory address, and a
+``pointee'' that is used to dereference the pointer.
Pointer/pointee pairs are declared in statements of the form:
@smallexample
@item @code{CONVERT='R16_IEEE'} Use IEEE 128-bit format for
@code{REAL(KIND=16)}.
@item @code{CONVERT='R16_IBM'} Use IBM @code{long double} format for
-real@code{REAL(KIND=16)}.
+@code{REAL(KIND=16)}.
@end itemize
Using the option could look like this:
supports as @code{REAL(KIND=10)} and @code{REAL(KIND=16)}, will
probably not work.
-@emph{Note that the values specified via the GFORTRAN_CONVERT_UNIT
-environment variable will override the CONVERT specifier in the
-open statement}. This is to give control over data formats to
+Note that the values specified via the @env{GFORTRAN_CONVERT_UNIT}
+environment variable will override the @code{CONVERT} specifier in the
+@code{OPEN} statement. This is to give control over data formats to
users who do not have the source code of their program available.
Using anything but the native representation for unformatted data
@end example
@noindent
-GNU Fortran implements STRUCTURES like derived types with the following
+GNU Fortran implements structures like derived types with the following
rules and exceptions:
@itemize @bullet
...
@end smallexample
-The type name may be ommitted, in which case the structure type itself is
+The type name may be omitted, in which case the structure type itself is
anonymous, and other structures of the same type cannot be instantiated. The
following shows some examples:
compatibility.
@node TYPE as an alias for PRINT
-@subsection TYPE as an alias for PRINT
+@subsection @code{TYPE} as an alias for @code{PRINT}
@cindex type alias print
For compatibility, GNU Fortran will interpret @code{TYPE} statements as
@code{PRINT} statements with the flag @option{-fdec}. With this flag asserted,
@end smallexample
@node .XOR. operator
-@subsection .XOR. operator
+@subsection @code{.XOR.} operator
@cindex operators, xor
GNU Fortran supports @code{.XOR.} as a logical operator with @code{-std=legacy}
Here is the mapping of logical operator to bitwise intrinsic used with
@option{-fdec}:
-@multitable @columnfractions .25 .25 .5
+@multitable @columnfractions .2 .2 .6
@headitem Operator @tab Intrinsic @tab Bitwise operation
-@item @code{.NOT.} @tab @code{@ref{NOT}} @tab complement
-@item @code{.AND.} @tab @code{@ref{IAND}} @tab intersection
-@item @code{.OR.} @tab @code{@ref{IOR}} @tab union
-@item @code{.NEQV.} @tab @code{@ref{IEOR}} @tab exclusive or
-@item @code{.EQV.} @tab @code{@ref{NOT}(@ref{IEOR})} @tab complement of exclusive or
+@item @code{.NOT.} @tab @code{NOT} @tab complement (@pxref{NOT})
+@item @code{.AND.} @tab @code{IAND} @tab intersection (@pxref{IAND})
+@item @code{.OR.} @tab @code{IOR} @tab union (@pxref{IOR})
+@item @code{.NEQV.} @tab @code{IEOR} @tab exclusive or (@pxref{IEOR})
+@item @code{.EQV.} @tab @code{NOT IEOR} @tab complement of exclusive or (@pxref{IEOR})
@end multitable
@node Extended I/O specifiers
@item CARRIAGECONTROL
The @code{CARRIAGECONTROL} specifier allows a user to control line
termination settings between output records for an I/O unit. The specifier has
-no meaning for readonly files. When @code{CARRAIGECONTROL} is specified upon
+no meaning for readonly files. When @code{CARRIAGECONTROL} is specified upon
opening a unit for formatted writing, the exact @code{CARRIAGECONTROL} setting
determines what characters to write between output records. The syntax is:
OPEN(..., CARRIAGECONTROL=cc)
@end smallexample
-Where @emph{cc} is a character expression that evaluates to one of the
+@noindent
+where @emph{cc} is a character expression that evaluates to one of the
following values:
@multitable @columnfractions .2 .8
@end table
@node Legacy PARAMETER statements
-@subsection Legacy PARAMETER statements
+@subsection Legacy @code{PARAMETER} statements
@cindex PARAMETER
-For compatibility, GNU Fortran supports legacy PARAMETER statements without
+For compatibility, GNU Fortran supports legacy @code{PARAMETER}
+statements without
parentheses with @option{-std=legacy}. A warning is emitted if used with
@option{-std=gnu}, and an error is acknowledged with a real Fortran standard
flag (@option{-std=f95}, etc...). These statements take the following form:
Unsigned numbers have a trailing @code{u} as suffix, optionally followed
by a @code{KIND} number separated by an underscore.
-Input and output can be done using the @code{I}, @code{B}, @code{O}
-and @code{Z} descriptors, plus unformatted I/O.
+Input and output can be done using the @samp{I}, @samp{B}, @samp{O}
+and @samp{Z} descriptors, plus unformatted I/O.
Here is a small, somewhat contrived example of their use:
@smallexample
as index variables in @code{DO} loops and as array indices.
Unsigned numbers can be read and written using list-directed,
-formatted and unformatted I/O. For formatted I/O, the @code{B},
-@code{I}, @code{O} and @code{Z} descriptors are valid. Negative
+formatted and unformatted I/O. For formatted I/O, the @samp{B},
+@samp{I}, @samp{O} and @samp{Z} descriptors are valid. Negative
values and values which would overflow are rejected with
@code{-pedantic}.
@item @code{TRANSFER}, @pxref{TRANSFER}
@end itemize
-The following intinsics are enabled with @option{-funsigned}:
+The following intrinsics are enabled with @option{-funsigned}:
@itemize @bullet
@item @code{UINT}, @pxref{UINT}
@item @code{UMASKL}, @pxref{UMASKL}
@node GNU Fortran Compiler Directives
@section GNU Fortran Compiler Directives
+@cindex GNU Fortran Compiler Directives
+@cindex Compiler Directives
+@cindex Directives
@menu
* ATTRIBUTES directive::
@end menu
@node ATTRIBUTES directive
-@subsection ATTRIBUTES directive
+@subsection @code{ATTRIBUTES} directive
+@cindex @code{ATTRIBUTES} directive
The Fortran standard describes how a conforming program shall
behave; however, the exact implementation is not standardized. In order
@node UNROLL directive
-@subsection UNROLL directive
+@subsection @code{UNROLL} directive
+@cindex @code{UNROLL} directive
The syntax of the directive is
@node BUILTIN directive
-@subsection BUILTIN directive
+@subsection @code{BUILTIN} directive
+@cindex @code{BUILTIN} directive
The syntax of the directive is
-@code{!GCC$ BUILTIN (B) attributes simd FLAGS IF('target')}
+@code{!GCC$ BUILTIN (@var{B}) attributes simd @var{FLAGS} IF('target')}
You can use this directive to define which middle-end built-ins provide vector
-implementations. @code{B} is name of the middle-end built-in. @code{FLAGS}
-are optional and must be either "(inbranch)" or "(notinbranch)".
+implementations. @var{B} is name of the middle-end built-in. @var{FLAGS}
+are optional and must be either @code{(inbranch)} or @code{(notinbranch)}.
@code{IF} statement is optional and is used to filter multilib ABIs
for the built-in that should be vectorized. Example usage:
@node IVDEP directive
-@subsection IVDEP directive
+@subsection @code{IVDEP} directive
+@cindex @code{IVDEP} directive
The syntax of the directive is
@node VECTOR directive
-@subsection VECTOR directive
+@subsection @code{VECTOR} directive
+@cindex @code{VECTOR} directive
The syntax of the directive is
@node NOVECTOR directive
-@subsection NOVECTOR directive
+@subsection @code{NOVECTOR} directive
+@cindex @code{NOVECTOR} directive
The syntax of the directive is
@node Non-Fortran Main Program
@section Non-Fortran Main Program
+@cindex Non-Fortran Main Program
+@cindex Main Program
@menu
* _gfortran_set_args:: Save command-line arguments
@node Naming conventions
@subsection Naming conventions
+@cindex Naming conventions
According the Fortran standard, valid Fortran names consist of a letter
between @code{A} to @code{Z}, @code{a} to @code{z}, digits @code{0},
@node Argument passing conventions
@subsection Argument passing conventions
+@cindex Argument passing conventions
Subroutines do not return a value (matching C99's @code{void}) while
functions either return a value as specified in the platform ABI or
the argument passing is modified and no longer completely matches
the platform ABI. Some other Fortran compilers use @code{f2c}
semantic by default; this might cause problems with
-interoperablility.
+interoperability.
GNU Fortran passes most arguments by reference, i.e. by passing a
pointer to the data. Note that the compiler might use a temporary
@node Type and enum ABI Documentation
@section Type and enum ABI Documentation
+@cindex Coarray type and enum ABI
@menu
* caf_token_t::
@node caf_token_t
@subsection @code{caf_token_t}
+@cindex @code{caf_token_t}
Typedef of type @code{void *} on the compiler side. Can be any data
type on the library side.
@node caf_register_t
@subsection @code{caf_register_t}
+@cindex @code{caf_register_t}
Indicates which kind of coarray variable should be registered.
-@verbatim
-typedef enum caf_register_t {
+@smallexample
+typedef enum caf_register_t @{
CAF_REGTYPE_COARRAY_STATIC,
CAF_REGTYPE_COARRAY_ALLOC,
CAF_REGTYPE_LOCK_STATIC,
CAF_REGTYPE_EVENT_ALLOC,
CAF_REGTYPE_COARRAY_ALLOC_REGISTER_ONLY,
CAF_REGTYPE_COARRAY_ALLOC_ALLOCATE_ONLY
-}
+@}
caf_register_t;
-@end verbatim
+@end smallexample
The values @code{CAF_REGTYPE_COARRAY_ALLOC_REGISTER_ONLY} and
@code{CAF_REGTYPE_COARRAY_ALLOC_ALLOCATE_ONLY} are for allocatable components
@node caf_deregister_t
@subsection @code{caf_deregister_t}
+@cindex @code{caf_deregister_t}
-@verbatim
-typedef enum caf_deregister_t {
+@smallexample
+typedef enum caf_deregister_t @{
CAF_DEREGTYPE_COARRAY_DEREGISTER,
CAF_DEREGTYPE_COARRAY_DEALLOCATE_ONLY
-}
+@}
caf_deregister_t;
-@end verbatim
+@end smallexample
Allows to specify the type of deregistration of a coarray object. The
@code{CAF_DEREGTYPE_COARRAY_DEALLOCATE_ONLY} flag is only allowed for
@node caf_reference_t
@subsection @code{caf_reference_t}
+@cindex @code{caf_reference_t}
The structure used for implementing arbitrary reference chains.
A @code{CAF_REFERENCE_T} allows to specify a component reference or any kind
kinds as known by the compiler/Fortran standard are supported indicated by
a @code{MODE}.
-@verbatim
-typedef enum caf_ref_type_t {
+@smallexample
+typedef enum caf_ref_type_t @{
/* Reference a component of a derived type, either regular one or an
allocatable or pointer type. For regular ones idx in caf_reference_t is
set to -1. */
has no array descriptor associated and the addressing is done
completely using the ref. */
CAF_REF_STATIC_ARRAY
-} caf_ref_type_t;
-@end verbatim
+@} caf_ref_type_t;
+@end smallexample
-@verbatim
-typedef enum caf_array_ref_t {
+@smallexample
+typedef enum caf_array_ref_t @{
/* No array ref. This terminates the array ref. */
CAF_ARR_REF_NONE = 0,
/* Reference array elements given by a vector. Only for this mode
/* An array ref of the kind (:i), where the lower bound of the array ref
is given by the remote side. The index i is given in the end member. */
CAF_ARR_REF_OPEN_START
-} caf_array_ref_t;
-@end verbatim
+@} caf_array_ref_t;
+@end smallexample
-@verbatim
+@smallexample
/* References to remote components of a derived type. */
-typedef struct caf_reference_t {
+typedef struct caf_reference_t @{
/* A pointer to the next ref or NULL. */
struct caf_reference_t *next;
/* The type of the reference. */
the factor to advance the array pointer with to get to the next item.
For component refs this gives just the size of the element referenced. */
size_t item_size;
- union {
- struct {
+ union @{
+ struct @{
/* The offset (in bytes) of the component in the derived type.
Unused for allocatable or pointer components. */
ptrdiff_t offset;
/* The offset (in bytes) to the caf_token associated with this
component. NULL, when not allocatable/pointer ref. */
ptrdiff_t caf_token_offset;
- } c;
- struct {
+ @} c;
+ struct @{
/* The mode of the array ref. See CAF_ARR_REF_*. */
/* caf_array_ref_t, replaced by unsigend char to allow specification in
fortran FE. */
/* The type of a static array. Unset for array's with descriptors. */
int static_array_type;
/* Subscript refs (s) or vector refs (v). */
- union {
- struct {
+ union @{
+ struct @{
/* The start and end boundary of the ref and the stride. */
index_type start, end, stride;
- } s;
- struct {
+ @} s;
+ struct @{
/* nvec entries of kind giving the elements to reference. */
void *vector;
/* The number of entries in vector. */
size_t nvec;
/* The integer kind used for the elements in vector. */
int kind;
- } v;
- } dim[GFC_MAX_DIMENSIONS];
- } a;
- } u;
-} caf_reference_t;
-@end verbatim
+ @} v;
+ @} dim[GFC_MAX_DIMENSIONS];
+ @} a;
+ @} u;
+@} caf_reference_t;
+@end smallexample
The references make up a single linked list of reference operations. The
@code{NEXT} member links to the next reference or NULL to indicate the end of
@node Function ABI Documentation
@section Function ABI Documentation
+@cindex Coarray Function ABI
@menu
-* _gfortran_caf_init:: Initialiation function
+* _gfortran_caf_init:: Initialization function
* _gfortran_caf_finish:: Finalization function
* _gfortran_caf_this_image:: Querying the image number
* _gfortran_caf_num_images:: Querying the maximal number of images
@node _gfortran_caf_init
-@subsection @code{_gfortran_caf_init} --- Initialiation function
+@subsection @code{_gfortran_caf_init} --- Initialization function
@cindex Coarray, _gfortran_caf_init
@table @asis
@item @emph{Description}:
This function returns the number of images in the current team, if
@var{distance} is 0 or the number of images in the parent team at the specified
-distance. If failed is -1, the function returns the number of all images at
+distance. If @var{failed} is -1, the function returns the number of all images at
the specified distance; if it is 0, the function returns the number of
nonfailed images, and if it is 1, it returns the number of failed images.
@end multitable
@item @emph{NOTES}
-For nonalloatable coarrays this function is never called. If a cleanup is
+For nonallocatable coarrays this function is never called. If a cleanup is
required, it has to be handled via the finish, stop and error stop functions,
and via destructors.
@end table
positive number; zero indicates the current image when used noncoindexed.
@item @var{old} @tab intent(out) The value which the atomic variable had
just before the cas operation.
-@item @var{compare} @tab intent(in) The value used for comparision.
+@item @var{compare} @tab intent(in) The value used for comparison.
@item @var{new_val} @tab intent(in) The new value for the atomic variable,
assigned to the atomic variable, if @code{compare} equals the value of the
atomic variable.
* Directory Options:: Where to find module files
* Link Options :: Influencing the linking step
* Runtime Options:: Influencing runtime behavior
+* Developer Options:: Printing GNU Fortran specific info, debugging dumps.
* Code Gen Options:: Specifying conventions for function calls, data layout
and register usage.
-* Developer Options:: Printing GNU Fortran specific info, debugging dumps.
* Interoperability Options:: Options for interoperability with other
languages.
* Environment Variables:: Environment variables that affect @command{gfortran}.
@gccoptlist{-faggressive-function-elimination -fblas-matmul-limit=@var{n}
-fbounds-check -ftail-call-workaround -ftail-call-workaround=@var{n}
-fcheck-array-temporaries
--fcheck=@var{<all|array-temps|bits|bounds|do|mem|pointer|recursion>}
--fcoarray=@var{<none|single|lib>} -fexternal-blas -ff2c
+-fcheck=<all|array-temps|bits|bounds|do|mem|pointer|recursion>
+-fcoarray=<none|single|lib> -fexternal-blas -ff2c
-ffrontend-loop-interchange -ffrontend-optimize
-finit-character=@var{n} -finit-integer=@var{n} -finit-local-zero
--finit-derived -finit-logical=@var{<true|false>}
--finit-real=@var{<zero|inf|-inf|nan|snan>}
+-finit-derived -finit-logical=<true|false>
+-finit-real=<zero|inf|-inf|nan|snan>
-finline-intrinsics[=<@var{minloc},@var{maxloc}>]
-finline-matmul-limit=@var{n}
-finline-arg-packing -fmax-array-constructor=@var{n}
@opindex fdec-intrinsic-ints
@item -fdec-intrinsic-ints
-Enable B/I/J/K kind variants of existing integer functions (e.g. BIAND, IIAND,
-JIAND, etc...). For a complete list of intrinsics see the full documentation.
+Enable B/I/J/K kind variants of existing integer functions
+(e.g. @code{BIAND}, @code{IIAND}, @code{JIAND}, etc...).
+For a complete list of intrinsics see @ref{Intrinsic Procedures}.
@opindex fdec-math
@item -fdec-math
Obsolete flag. The purpose of this option was to
-enable legacy math intrinsics such as COTAN and degree-valued trigonometric
-functions (e.g. TAND, ATAND, etc...) for compatability with older code. This
+enable legacy math intrinsics such as @code{COTAN} and degree-valued
+trigonometric functions (e.g. @code{TAND}, @code{ATAND}, etc...)
+for compatibility with older code. This
option is no longer operable. The trigonometric functions are now either
part of Fortran 2023 or GNU extensions.
@opindex fdec-static
@item -fdec-static
-Enable DEC-style STATIC and AUTOMATIC attributes to explicitly specify
+Enable DEC-style @code{STATIC} and @code{AUTOMATIC}
+attributes to explicitly specify
the storage of variables and other objects.
@opindex fdec-include
@item -fdec-include
-Enable parsing of INCLUDE as a statement in addition to parsing it as
-INCLUDE line. When parsed as INCLUDE statement, INCLUDE does not have to
+Enable parsing of @code{INCLUDE} as a statement in addition to parsing it as
+@code{INCLUDE} line.
+When parsed as @code{INCLUDE} statement, @code{INCLUDE} does not have to
be on a single line and can use line continuations.
@opindex fdec-format-defaults
@item -fdec-format-defaults
-Enable format specifiers F, G and I to be used without width specifiers,
-default widths will be used instead.
+Enable format specifiers @samp{F}, @samp{G} and @samp{I}
+to be used without width specifiers; default widths are used instead.
@opindex fdec-blank-format-item
@item -fdec-blank-format-item
@item -fbackslash
Change the interpretation of backslashes in string literals from a single
backslash character to ``C-style'' escape characters. The following
-combinations are expanded @code{\a}, @code{\b}, @code{\f}, @code{\n},
-@code{\r}, @code{\t}, @code{\v}, @code{\\}, and @code{\0} to the ASCII
+combinations are expanded: @samp{\a}, @samp{\b}, @samp{\f}, @samp{\n},
+@samp{\r}, @samp{\t}, @samp{\v}, @samp{\\}, and @samp{\0} to the ASCII
characters alert, backspace, form feed, newline, carriage return,
horizontal tab, vertical tab, backslash, and NUL, respectively.
-Additionally, @code{\x}@var{nn}, @code{\u}@var{nnnn} and
-@code{\U}@var{nnnnnnnn} (where each @var{n} is a hexadecimal digit) are
+Additionally, @samp{\x@var{nn}}, @samp{\u@var{nnnn}} and
+@samp{\U@var{nnnnnnnn}} (where each @var{n} is a hexadecimal digit) are
translated into the Unicode characters corresponding to the specified code
-points. All other combinations of a character preceded by \ are
+points. All other combinations of a character preceded by @samp{\} are
unexpanded.
@opindex fmodule-private
@itemize @bullet
@item
-An INTEGER SELECT construct has a CASE that can never be matched as its
+An @code{INTEGER}-typed @code{SELECT CASE} construct has a @code{CASE}
+that can never be matched as its
lower value is greater than its upper value.
@item
-A LOGICAL SELECT construct has three CASE statements.
+A @code{LOGICAL}-typed @code{SELECT CASE} construct has three @code{CASE}
+statements.
@item
-A TRANSFER specifies a source that is shorter than the destination.
+A @code{TRANSFER} specifies a source that is shorter than the destination.
@item
The type of a function result is declared more than once with the same type. If
@opindex Wundefined-do-loop
@cindex warnings, undefined do loop
@item -Wundefined-do-loop
-Warn if a DO loop with step either 1 or -1 yields an underflow or an overflow
+Warn if a @code{DO} loop with step either 1 or -1 yields an underflow
+or an overflow
during iteration of an induction variable of the loop.
This option is implied by @option{-Wall}.
@cindex warnings, underflow
@cindex underflow
@item -Wunderflow
-Produce a warning when numerical constant expressions are
-encountered, which yield an UNDERFLOW during compilation. Enabled by default.
+Produce a warning when numerical constant expressions
+that yield an underflow are encountered during compilation.
+Enabled by default.
@opindex Wintrinsic-shadow
@cindex warnings, intrinsic
@opindex Wdo-subscript
@item -Wdo-subscript
-Warn if an array subscript inside a DO loop could lead to an
+Warn if an array subscript inside a @code{DO} loop could lead to an
out-of-bounds access even if the compiler cannot prove that the
statement is actually executed, in cases like
@smallexample
@xref{Warning Options,,Options to Request or Suppress Errors and
Warnings, gcc,Using the GNU Compiler Collection (GCC)}, for information on
-more options offered by the GBE shared by @command{gfortran}, @command{gcc}
+more options offered by the back end shared by @command{gfortran}, @command{gcc}
and other GNU compilers.
Some of these have no effect when compiling programs written in Fortran.
@code{REAL(KIND=16)}.
@end itemize
-@emph{This option has an effect only when used in the main program.
-The @code{CONVERT} specifier and the GFORTRAN_CONVERT_UNIT environment
-variable override the default specified by @option{-fconvert}.}
+This option has an effect only when used in the main program.
+The @code{CONVERT} specifier and the @env{GFORTRAN_CONVERT_UNIT} environment
+variable override the default specified by @option{-fconvert}.
@opindex frecord-marker=@var{length}
@item -frecord-marker=@var{length}
@cindex @code{SAVE} statement
@cindex statement, @code{SAVE}
@item -fno-automatic
-Treat each program unit (except those marked as RECURSIVE) as if the
+Treat each program unit (except those marked as @code{RECURSIVE}) as if the
@code{SAVE} statement were specified for every local variable and array
referenced in it. Does not affect common blocks. (Some Fortran compilers
provide this option under the name @option{-static} or @option{-save}.)
@item -fmax-stack-var-size=@var{n}
This option specifies the size in bytes of the largest array that will be put
on the stack; if the size is exceeded static memory is used (except in
-procedures marked as RECURSIVE). Use the option @option{-frecursive} to
-allow for recursive procedures which do not have a RECURSIVE attribute or
+procedures marked as @code{RECURSIVE}).
+Use the option @option{-frecursive} to
+allow for recursive procedures which do not have a
+@code{RECURSIVE} attribute or
for parallel programs. Use @option{-fno-automatic} to never use the stack.
This option currently only affects local arrays declared with constant
present in the comma-separated list provided as argument.
For each intrinsic, if no choice of implementation was made through either of
-the flag variants, a default behaviour is chosen depending on optimization:
+the flag variants, a default behavior is chosen depending on optimization:
library calls are generated when not optimizing or when optimizing for size;
otherwise inline code is preferred.
@item -finit-local-zero
@itemx -finit-derived
@itemx -finit-integer=@var{n}
-@itemx -finit-real=@var{<zero|inf|-inf|nan|snan>}
-@itemx -finit-logical=@var{<true|false>}
+@itemx -finit-real=<zero|inf|-inf|nan|snan>
+@itemx -finit-logical=<true|false>
@itemx -finit-character=@var{n}
The @option{-finit-local-zero} option instructs the compiler to
initialize local @code{INTEGER}, @code{REAL}, and @code{COMPLEX}
@code{CHARACTER} variables to a string of null bytes. Finer-grained
initialization options are provided by the
@option{-finit-integer=@var{n}},
-@option{-finit-real=@var{<zero|inf|-inf|nan|snan>}} (which also initializes
+@option{-finit-real=<zero|inf|-inf|nan|snan>} (which also initializes
the real and imaginary parts of local @code{COMPLEX} variables),
-@option{-finit-logical=@var{<true|false>}}, and
+@option{-finit-logical=<true|false>}, and
@option{-finit-character=@var{n}} (where @var{n} is an ASCII character
value) options.
These options do not initialize
@itemize @bullet
@item
-objects with the POINTER attribute
+objects with the @code{POINTER} attribute
@item
allocatable arrays
@item
@xref{Code Gen Options,,Options for Code Generation Conventions,
gcc,Using the GNU Compiler Collection (GCC)}, for information on more options
-offered by the GBE
+offered by the back end
shared by @command{gfortran}, @command{gcc}, and other GNU compilers.
@c man end
@node Interoperability Options
@section Options for interoperability with other languages
-@table @asis
+@table @gcctabopt
@opindex c-prototypes
@cindex Generating C prototypes from Fortran BIND(C) enteties