OSDN Git Service

2012-01-29 Tobias Burnus <burnus@net-b.de>
[pf3gnuchains/gcc-fork.git] / gcc / fortran / invoke.texi
index 225c418..410da2c 100644 (file)
@@ -1,21 +1,20 @@
-@c Copyright (C) 2004, 2005, 2006, 2007
+@c Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
 @c Free Software Foundation, Inc.
 @c This is part of the GNU Fortran manual.   
 @c For copying conditions, see the file gfortran.texi.
 
 @ignore
 @c man begin COPYRIGHT
-Copyright @copyright{} 2004, 2005, 2006, 2007
+Copyright @copyright{} 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
 Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
+under the terms of the GNU Free Documentation License, Version 1.3 or
 any later version published by the Free Software Foundation; with the
-Invariant Sections being ``GNU General Public License'' and ``Funding
-Free Software'', the Front-Cover texts being (a) (see below), and with
-the Back-Cover Texts being (b) (see below).  A copy of the license is
-included in the gfdl(7) man page.
+Invariant Sections being ``Funding Free Software'', the Front-Cover
+Texts being (a) (see below), and with the Back-Cover Texts being (b)
+(see below).  A copy of the license is included in the gfdl(7) man page.
+
 (a) The FSF's Front-Cover Text is:
 
      A GNU Manual
@@ -36,7 +35,7 @@ gfortran [@option{-c}|@option{-S}|@option{-E}]
          [@option{-I}@var{dir}@dots{}] [@option{-L}@var{dir}@dots{}]
          [@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}]
          [@option{-f}@var{option}@dots{}]
-        [@option{-m}@var{machine-option}@dots{}]
+         [@option{-m}@var{machine-option}@dots{}]
          [@option{-o} @var{outfile}] @var{infile}@dots{}
 
 Only the most useful options are listed here; see below for the
@@ -50,7 +49,7 @@ and the Info entries for @file{gcc}, @file{cpp}, @file{gfortran}, @file{as},
 @c man end
 @c man begin BUGS
 For instructions on reporting bugs, see
-@w{@uref{http://gcc.gnu.org/bugs.html}}.
+@w{@value{BUGURL}}.
 @c man end
 @c man begin AUTHOR
 See the Info entry for @command{gfortran} for contributors to GCC and
@@ -67,7 +66,8 @@ GNU Fortran.
 @c man begin DESCRIPTION
 
 The @command{gfortran} command supports all the options supported by the
-@command{gcc} command.  Only options specific to GNU Fortran are documented here.
+@command{gcc} command.  Only options specific to GNU Fortran are documented
+here.
 
 @xref{Invoking GCC,,GCC Command Options,gcc,Using the GNU Compiler
 Collection (GCC)}, for information
@@ -75,7 +75,6 @@ on the non-Fortran-specific aspects of the @command{gcc} command (and,
 therefore, the @command{gfortran} command).
 
 @cindex options, negative forms
-@cindex negative forms of options
 All GCC and GNU Fortran options
 are accepted both by @command{gfortran} and by @command{gcc}
 (as well as any other drivers built at the same time,
@@ -95,17 +94,19 @@ one is not the default.
                         without explanations.
 * Fortran Dialect Options::  Controlling the variant of Fortran language
                              compiled.
+* Preprocessing Options::  Enable and customize preprocessing.
 * Error and Warning Options::     How picky should the compiler be?
 * Debugging Options::   Symbol tables, measurements, and debugging dumps.
 * Directory Options::   Where to find module files
+* Link Options ::       Influencing the linking step
 * Runtime Options::     Influencing runtime behavior
 * Code Gen Options::    Specifying conventions for function calls, data layout
                         and register usage.
-* Environment Variables:: Env vars that affect @command{gfortran}.
+* Environment Variables:: Environment variables that affect @command{gfortran}.
 @end menu
 
 @node Option Summary
-@section Option Summary
+@section Option summary
 
 @c man begin OPTIONS
 
@@ -114,60 +115,83 @@ by type.  Explanations are in the following sections.
 
 @table @emph
 @item Fortran Language Options
-@xref{Fortran Dialect Options,,Options Controlling Fortran Dialect}.
-@gccoptlist{-fall-intrinsics  -ffree-form  -fno-fixed-form @gol
--fdollar-ok  -fimplicit-none  -fmax-identifier-length @gol
--std=@var{std} -fd-lines-as-code  -fd-lines-as-comments @gol
--ffixed-line-length-@var{n}  -ffixed-line-length-none @gol
--ffree-line-length-@var{n}  -ffree-line-length-none @gol
--fdefault-double-8  -fdefault-integer-8  -fdefault-real-8 @gol
--fcray-pointer  -fopenmp  -frange-check -fno-backslash }
+@xref{Fortran Dialect Options,,Options controlling Fortran dialect}.
+@gccoptlist{-fall-intrinsics -fbackslash -fcray-pointer -fd-lines-as-code @gol
+-fd-lines-as-comments -fdefault-double-8 -fdefault-integer-8 @gol
+-fdefault-real-8 -fdollar-ok -ffixed-line-length-@var{n} @gol
+-ffixed-line-length-none -ffree-form -ffree-line-length-@var{n} @gol
+-ffree-line-length-none -fimplicit-none -finteger-4-integer-8 @gol
+-fmax-identifier-length -fmodule-private -fno-fixed-form -fno-range-check @gol
+-fopenmp -freal-4-real-10 -freal-4-real-16 -freal-4-real-8 @gol
+-freal-8-real-10 -freal-8-real-16 -freal-8-real-4 -std=@var{std}
+}
+
+@item Preprocessing Options
+@xref{Preprocessing Options,,Enable and customize preprocessing}.
+@gccoptlist{-A-@var{question}@r{[}=@var{answer}@r{]}
+-A@var{question}=@var{answer} -C -CC -D@var{macro}@r{[}=@var{defn}@r{]}
+-H -P @gol
+-U@var{macro} -cpp -dD -dI -dM -dN -dU -fworking-directory
+-imultilib @var{dir} @gol
+-iprefix @var{file} -iquote -isysroot @var{dir} -isystem @var{dir} -nocpp 
+-nostdinc @gol
+-undef
+}
 
 @item Error and Warning Options
-@xref{Error and Warning Options,,Options to Request or Suppress Errors
-and Warnings}.
-@gccoptlist{-fmax-errors=@var{n} @gol
--fsyntax-only  -pedantic  -pedantic-errors @gol
--w  -Wall  -Waliasing  -Wampersand  -Wcharacter-truncation  -Wconversion @gol
--Wimplicit-interface  -Wline-truncation  -Wnonstd-intrinsics  -Wsurprising @gol
--Wno-tabs  -Wunderflow  -W}
+@xref{Error and Warning Options,,Options to request or suppress errors
+and warnings}.
+@gccoptlist{-Waliasing -Wall -Wampersand -Warray-bounds
+-Wcharacter-truncation @gol
+-Wconversion -Wfunction-elimination -Wimplicit-interface @gol
+-Wimplicit-procedure -Wintrinsic-shadow -Wintrinsics-std @gol
+-Wline-truncation -Wno-align-commons -Wno-tabs -Wreal-q-constant @gol
+-Wsurprising -Wunderflow -Wunused-parameter -fmax-errors=@var{n}
+-fsyntax-only @gol
+-pedantic -pedantic-errors
+}
 
 @item Debugging Options
-@xref{Debugging Options,,Options for Debugging Your Program or GCC}.
-@gccoptlist{-fdump-parse-tree  -ffpe-trap=@var{list} @gol
--fdump-core -fbacktrace}
+@xref{Debugging Options,,Options for debugging your program or GNU Fortran}.
+@gccoptlist{-fbacktrace -fdump-fortran-optimized -fdump-fortran-original @gol
+-fdump-parse-tree -ffpe-trap=@var{list}
+}
 
 @item Directory Options
-@xref{Directory Options,,Options for Directory Search}.
-@gccoptlist{-I@var{dir}  -J@var{dir}  -M@var{dir}  -fintrinsic-modules-path @var{dir}}
+@xref{Directory Options,,Options for directory search}.
+@gccoptlist{-I@var{dir}  -J@var{dir} -fintrinsic-modules-path @var{dir}}
+
+@item Link Options
+@xref{Link Options,,Options for influencing the linking step}.
+@gccoptlist{-static-libgfortran}
 
 @item Runtime Options
 @xref{Runtime Options,,Options for influencing runtime behavior}.
-@gccoptlist{-fconvert=@var{conversion}  -frecord-marker=@var{length} @gol
--fmax-subrecord-length=@var{length}}
+@gccoptlist{-fconvert=@var{conversion} -fmax-subrecord-length=@var{length}
+-fno-range-check @gol
+-frecord-marker=@var{length} -fsign-zero
+}
 
 @item Code Generation Options
-@xref{Code Gen Options,,Options for Code Generation Conventions}.
-@gccoptlist{-fno-automatic  -ff2c  -fno-underscoring
--fsecond-underscore @gol
--fbounds-check  -fmax-stack-var-size=@var{n} @gol
--fpack-derived  -frepack-arrays  -fshort-enums  -fexternal-blas @gol
--fblas-matmul-limit=@var{n}}
+@xref{Code Gen Options,,Options for code generation conventions}.
+@gccoptlist{-faggressive-function-elimination -fblas-matmul-limit=@var{n} @gol
+-fbounds-check -fcheck-array-temporaries @gol
+-fcheck=@var{<all|array-temps|bounds|do|mem|pointer|recursion>} @gol
+-fcoarray=@var{<none|single|lib>} -fexternal-blas -ff2c
+-ffrontend-optimize @gol
+-finit-character=@var{n} -finit-integer=@var{n} -finit-local-zero @gol
+-finit-logical=@var{<true|false>}
+-finit-real=@var{<zero|inf|-inf|nan|snan>} @gol
+-fmax-array-constructor=@var{n} -fmax-stack-var-size=@var{n}
+-fno-align-commons @gol
+-fno-automatic -fno-protect-parens -fno-underscoring -fno-whole-file @gol
+-fsecond-underscore -fpack-derived -frealloc-lhs -frecursive @gol
+-frepack-arrays -fshort-enums -fstack-arrays
+}
 @end table
 
-@menu
-* Fortran Dialect Options::  Controlling the variant of Fortran language
-                             compiled.
-* Error and Warning Options::     How picky should the compiler be?
-* Debugging Options::   Symbol tables, measurements, and debugging dumps.
-* Directory Options::   Where to find module files
-* Runtime Options::     Influencing runtime behavior
-* Code Gen Options::    Specifying conventions for function calls, data layout
-                        and register usage.
-@end menu
-
 @node Fortran Dialect Options
-@section Options Controlling Fortran Dialect
+@section Options controlling Fortran dialect
 @cindex dialect options
 @cindex language, dialect options
 @cindex options, dialect
@@ -177,35 +201,30 @@ accepted by the compiler:
 
 @table @gcctabopt
 @item -ffree-form
-@item -ffixed-form
-@cindex @code{-ffree-form} option
-@cindex option, @code{-ffree-form}
-@cindex @code{-fno-fixed-form} option
-@cindex option, @code{-fno-fixed-form}
-@cindex source file format
-@cindex free form
-@cindex fixed form
-@cindex Source Form
-@cindex Fortran 90, features
+@itemx -ffixed-form
+@opindex @code{ffree-form}
+@opindex @code{fno-fixed-form}
+@cindex options, fortran dialect
+@cindex file format, free
+@cindex file format, fixed
 Specify the layout used by the source file.  The free form layout
 was introduced in Fortran 90.  Fixed form was traditionally used in
 older Fortran programs.  When neither option is specified, the source
 form is determined by the file extension.
 
 @item -fall-intrinsics
-@cindex @code{-fall-intrinsics} option
-@cindex option, @code{-fall-intrinsics}
-Accept all of the intrinsic procedures provided in libgfortran 
-without regard to the setting of @option{-std}.  In particular, 
-this option can be quite useful with @option{-std=f95}.  Additionally,
-@command{gfortran} will ignore @option{-Wnonstd-intrinsics}.
+@opindex @code{fall-intrinsics}
+This option causes all intrinsic procedures (including the GNU-specific
+extensions) to be accepted.  This can be useful with @option{-std=f95} to
+force standard-compliance but get access to the full range of intrinsics
+available with @command{gfortran}.  As a consequence, @option{-Wintrinsics-std}
+will be ignored and no user-defined procedure with the same name as any
+intrinsic will be called except when it is explicitly declared @code{EXTERNAL}.
 
 @item -fd-lines-as-code
-@item -fd-lines-as-comments
-@cindex @code{-fd-lines-as-code}, option
-@cindex option, @code{-fd-lines-as-code}
-@cindex @code{-fd-lines-as-comments}, option
-@cindex option, @code{-fd-lines-as-comments}
+@itemx -fd-lines-as-comments
+@opindex @code{fd-lines-as-code}
+@opindex @code{fd-lines-as-comments}
 Enable special treatment for lines beginning with @code{d} or @code{D}
 in fixed form sources.  If the @option{-fd-lines-as-code} option is
 given they are treated as if the first column contained a blank.  If the
@@ -213,52 +232,69 @@ given they are treated as if the first column contained a blank.  If the
 comment lines.
 
 @item -fdefault-double-8
-@cindex @code{-fdefault-double-8}, option
-@cindex option, @code{-fdefault-double-8}
-Set the @code{DOUBLE PRECISION} type to an 8 byte wide type.
+@opindex @code{fdefault-double-8}
+Set the @code{DOUBLE PRECISION} type to an 8 byte wide type.  If
+@option{-fdefault-real-8} is given, @code{DOUBLE PRECISION} would
+instead be promoted to 16 bytes if possible, and @option{-fdefault-double-8}
+can be used to prevent this.  The kind of real constants like @code{1.d0} will
+not be changed by @option{-fdefault-real-8} though, so also
+@option{-fdefault-double-8} does not affect it.
 
 @item -fdefault-integer-8
-@cindex @code{-fdefault-integer-8}, option
-@cindex option, @code{-fdefault-integer-8}
+@opindex @code{fdefault-integer-8}
 Set the default integer and logical types to an 8 byte wide type.
-Do nothing if this is already the default.
+Do nothing if this is already the default.  This option also affects
+the kind of integer constants like @code{42}.
 
 @item -fdefault-real-8
-@cindex @code{-fdefault-real-8}, option
-@cindex option, @code{-fdefault-real-8}
+@opindex @code{fdefault-real-8}
 Set the default real type to an 8 byte wide type.
-Do nothing if this is already the default.
+Do nothing if this is already the default.  This option also affects
+the kind of non-double real constants like @code{1.0}, and does promote
+the default width of @code{DOUBLE PRECISION} to 16 bytes if possible, unless
+@code{-fdefault-double-8} is given, too.
 
 @item -fdollar-ok
-@cindex @code{-fdollar-ok} option
-@cindex option, @code{-fdollar-ok}
-@cindex dollar sign
+@opindex @code{fdollar-ok}
+@cindex @code{$}
 @cindex symbol names
 @cindex character set
-Allow @samp{$} as a valid character in a symbol name.
+Allow @samp{$} as a valid non-first character in a symbol name. Symbols 
+that start with @samp{$} are rejected since it is unclear which rules to
+apply to implicit typing as different vendors implement different rules.
+Using @samp{$} in @code{IMPLICIT} statements is also rejected.
 
-@item -fno-backslash
-@cindex @code{-fno-backslash} option
-@cindex option, @code{-fno-backslash}
+@item -fbackslash
+@opindex @code{backslash}
 @cindex backslash
 @cindex escape characters
-Change the interpretation of backslashes in string literals from
-``C-style'' escape characters to a single backslash character.
+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
+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
+translated into the Unicode characters corresponding to the specified code
+points. All other combinations of a character preceded by \ are
+unexpanded.
+
+@item -fmodule-private
+@opindex @code{fmodule-private}
+@cindex module entities
+@cindex private
+Set the default accessibility of module entities to @code{PRIVATE}.
+Use-associated entities will not be accessible unless they are explicitly
+declared as @code{PUBLIC}.
 
 @item -ffixed-line-length-@var{n}
-@cindex @code{-ffixed-line-length-}@var{n} option
-@cindex option, @code{-ffixed-line-length-}@var{n}
-@cindex source file format
-@cindex lines, length
-@cindex length of source lines
-@cindex fixed form
-@cindex limits, lengths of source lines
+@opindex @code{ffixed-line-length-}@var{n}
+@cindex file format, fixed
 Set column after which characters are ignored in typical fixed-form
 lines in the source file, and through which spaces are assumed (as
 if padded to that length) after the ends of short fixed-form lines.
 
-@cindex card image
-@cindex extended-source option
 Popular values for @var{n} include 72 (the
 standard and the default), 80 (card image), and 132 (corresponding
 to ``extended-source'' options in some popular compilers).
@@ -269,13 +305,8 @@ to them to fill out the line.
 @option{-ffixed-line-length-none}.
 
 @item -ffree-line-length-@var{n}
-@cindex @code{-ffree-line-length-}@var{n} option
-@cindex option, @code{-ffree-line-length-}@var{n}
-@cindex source file format
-@cindex lines, length
-@cindex length of source lines
-@cindex free form
-@cindex limits, lengths of source lines
+@opindex @code{ffree-line-length-}@var{n}
+@cindex file format, free
 Set column after which characters are ignored in typical free-form
 lines in the source file. The default value is 132.
 @var{n} may be @samp{none}, meaning that the entire line is meaningful.
@@ -283,27 +314,34 @@ lines in the source file. The default value is 132.
 @option{-ffree-line-length-none}.
 
 @item -fmax-identifier-length=@var{n}
-@cindex @code{-fmax-identifier-length=}@var{n} option
-@cindex option @option{-fmax-identifier-length=}@var{n}
+@opindex @code{fmax-identifier-length=}@var{n}
 Specify the maximum allowed identifier length. Typical values are
-31 (Fortran 95) and 63 (Fortran 2003).
+31 (Fortran 95) and 63 (Fortran 2003 and Fortran 2008).
 
 @item -fimplicit-none
-@cindex @code{-fimplicit-none} option
-@cindex option, @code{-fimplicit-none}
+@opindex @code{fimplicit-none}
 Specify that no implicit typing is allowed, unless overridden by explicit
 @code{IMPLICIT} statements.  This is the equivalent of adding
 @code{implicit none} to the start of every procedure.
 
+@item -finteger-4-integer-8
+@opindex @code{finteger-4-integer-8}
+Promote all @code{INTEGER(KIND=4)} entities to an @code{INTEGER(KIND=8)}
+entities.  If @code{KIND=8} is unavailable, then an error will be issued.
+This option should be used with care and may not be suitable for your codes.
+Areas of possible concern include calls to external procedures,
+alignment in @code{EQUIVALENCE} and/or @code{COMMON}, generic interfaces,
+BOZ literal constant conversion, and I/O.  Inspection of the intermediate
+representation of the translated Fortran code, produced by
+@option{-fdump-tree-original}, is suggested.
+
 @item -fcray-pointer
-@cindex @code{-fcray-pointer} option
-@cindex option, @code{-fcray-pointer}
+@opindex @code{fcray-pointer}
 Enable the Cray pointer extension, which provides C-like pointer
 functionality.
 
 @item -fopenmp
-@cindex @code{-fopenmp} option
-@cindex option, @code{-fopenmp}
+@opindex @code{fopenmp}
 @cindex OpenMP
 Enable the OpenMP extensions.  This includes OpenMP @code{!$omp} directives
 in free form
@@ -311,41 +349,310 @@ and @code{c$omp}, @code{*$omp} and @code{!$omp} directives in fixed form,
 @code{!$} conditional compilation sentinels in free form
 and @code{c$}, @code{*$} and @code{!$} sentinels in fixed form, 
 and when linking arranges for the OpenMP runtime library to be linked
-in.
-
-@item -frange-check
-@cindex @code{-frange-check} option
-@cindex option, @code{-frange-check}
-Enable range checking on results of simplification of constant
-expressions during compilation.  For example, by default, GNU Fortran
-will give an overflow error at compile time when simplifying @code{a =
-EXP(1000)}. With @option{-fno-range-check}, no error will be given and
-the variable @code{a} will be assigned the value @code{+Infinity}.
+in.  The option @option{-fopenmp} implies @option{-frecursive}.
+
+@item -fno-range-check
+@opindex @code{frange-check}
+Disable range checking on results of simplification of constant
+expressions during compilation.  For example, GNU Fortran will give
+an error at compile time when simplifying @code{a = 1. / 0}.
+With this option, no error will be given and @code{a} will be assigned
+the value @code{+Infinity}.  If an expression evaluates to a value
+outside of the relevant range of [@code{-HUGE()}:@code{HUGE()}],
+then the expression will be replaced by @code{-Inf} or @code{+Inf}
+as appropriate.
 Similarly, @code{DATA i/Z'FFFFFFFF'/} will result in an integer overflow
 on most systems, but with @option{-fno-range-check} the value will
 ``wrap around'' and @code{i} will be initialized to @math{-1} instead.
 
+@item  -freal-4-real-8
+@itemx -freal-4-real-10
+@itemx -freal-8-real-4
+@itemx -freal-8-real-10
+@itemx -freal-8-real-16
+@opindex @code{freal-4-real-8}
+@opindex @code{freal-4-real-10}
+@opindex @code{freal-4-real-16}
+@opindex @code{freal-8-real-4}
+@opindex @code{freal-8-real-10}
+@opindex @code{freal-8-real-16}
+@cindex options, real kind type promotion
+Promote all @code{REAL(KIND=M)} entities to @code{REAL(KIND=N)} entities.
+If @code{REAL(KIND=N)} is unavailable, then an error will be issued.
+All other real kind types are unaffected by this option.
+These options should be used with care and may not be suitable for your
+codes.  Areas of possible concern include calls to external procedures,
+alignment in @code{EQUIVALENCE} and/or @code{COMMON}, generic interfaces,
+BOZ literal constant conversion, and I/O.  Inspection of the intermediate
+representation of the translated Fortran code, produced by
+@option{-fdump-tree-original}, is suggested.
+
 @item -std=@var{std}
-@cindex @code{-std=}@var{std} option
-@cindex option, @code{-std=}@var{std}
+@opindex @code{std=}@var{std} option
 Specify the standard to which the program is expected to conform, which
-may be one of @samp{f95}, @samp{f2003}, @samp{gnu}, or @samp{legacy}.
-The default value for @var{std} is @samp{gnu}, which specifies a
-superset of the Fortran 95 standard that includes all of the extensions
-supported by GNU Fortran, although warnings will be given for obsolete
-extensions not recommended for use in new code.  The @samp{legacy} value
-is equivalent but without the warnings for obsolete extensions, and may
-be useful for old non-standard programs.  The @samp{f95} and
-@samp{f2003} values specify strict conformance to the Fortran 95 and
-Fortran 2003 standards, respectively; errors are given for all
-extensions beyond the relevant language standard, and warnings are given
-for the Fortran 77 features that are permitted but obsolescent in later
-standards.
+may be one of @samp{f95}, @samp{f2003}, @samp{f2008}, @samp{gnu}, or
+@samp{legacy}.  The default value for @var{std} is @samp{gnu}, which
+specifies a superset of the Fortran 95 standard that includes all of the
+extensions supported by GNU Fortran, although warnings will be given for
+obsolete extensions not recommended for use in new code.  The
+@samp{legacy} value is equivalent but without the warnings for obsolete
+extensions, and may be useful for old non-standard programs.  The
+@samp{f95}, @samp{f2003} and @samp{f2008} values specify strict
+conformance to the Fortran 95, Fortran 2003 and Fortran 2008 standards,
+respectively; errors are given for all extensions beyond the relevant
+language standard, and warnings are given for the Fortran 77 features
+that are permitted but obsolescent in later standards. @samp{-std=f2008ts}
+allows the Fortran 2008 standard including the additions of the 
+Technical Specification (TS) 29113 on Further Interoperability of Fortran
+with C.
 
 @end table
 
+@node Preprocessing Options
+@section Enable and customize preprocessing
+@cindex preprocessor
+@cindex options, preprocessor
+@cindex CPP
+
+Preprocessor related options. See section 
+@ref{Preprocessing and conditional compilation} for more detailed
+information on preprocessing in @command{gfortran}.
+
+@table @gcctabopt
+@item -cpp
+@itemx -nocpp
+@opindex @code{cpp}
+@opindex @code{fpp}
+@cindex preprocessor, enable
+@cindex preprocessor, disable
+Enable preprocessing. The preprocessor is automatically invoked if
+the file extension is @file{.fpp}, @file{.FPP},  @file{.F}, @file{.FOR},
+@file{.FTN}, @file{.F90}, @file{.F95}, @file{.F03} or @file{.F08}. Use
+this option to manually enable preprocessing of any kind of Fortran file.
+
+To disable preprocessing of files with any of the above listed extensions,
+use the negative form: @option{-nocpp}.
+
+The preprocessor is run in traditional mode. Any restrictions of the
+file-format, especially the limits on line length, apply for
+preprocessed output as well, so it might be advisable to use the
+@option{-ffree-line-length-none} or @option{-ffixed-line-length-none}
+options.
+
+@item -dM
+@opindex @code{dM}
+@cindex preprocessor, debugging
+@cindex debugging, preprocessor
+Instead of the normal output, generate a list of @code{'#define'}
+directives for all the macros defined during the execution of the
+preprocessor, including predefined macros. This gives you a way
+of finding out what is predefined in your version of the preprocessor.
+Assuming you have no file @file{foo.f90}, the command
+@smallexample
+  touch foo.f90; gfortran -cpp -E -dM foo.f90
+@end smallexample
+will show all the predefined macros.
+
+@item -dD
+@opindex @code{dD}
+@cindex preprocessor, debugging
+@cindex debugging, preprocessor
+Like @option{-dM} except in two respects: it does not include the
+predefined macros, and it outputs both the @code{#define} directives
+and the result of preprocessing. Both kinds of output go to the
+standard output file.
+
+@item -dN
+@opindex @code{dN}
+@cindex preprocessor, debugging
+@cindex debugging, preprocessor
+Like @option{-dD}, but emit only the macro names, not their expansions.
+
+@item -dU
+@opindex @code{dU}
+@cindex preprocessor, debugging
+@cindex debugging, preprocessor
+Like @option{dD} except that only macros that are expanded, or whose
+definedness is tested in preprocessor directives, are output; the 
+output is delayed until the use or test of the macro; and @code{'#undef'}
+directives are also output for macros tested but undefined at the time.
+
+@item -dI
+@opindex @code{dI}
+@cindex preprocessor, debugging
+@cindex debugging, preprocessor
+Output @code{'#include'} directives in addition to the result
+of preprocessing.
+
+@item -fworking-directory
+@opindex @code{fworking-directory}
+@cindex preprocessor, working directory
+Enable generation of linemarkers in the preprocessor output that will
+let the compiler know the current working directory at the time of
+preprocessing. When this option is enabled, the preprocessor will emit,
+after the initial linemarker, a second linemarker with the current
+working directory followed by two slashes. GCC will use this directory,
+when it is present in the preprocessed input, as the directory emitted
+as the current working directory in some debugging information formats.
+This option is implicitly enabled if debugging information is enabled,
+but this can be inhibited with the negated form
+@option{-fno-working-directory}. If the @option{-P} flag is present
+in the command line, this option has no effect, since no @code{#line}
+directives are emitted whatsoever.
+
+@item -idirafter @var{dir}
+@opindex @code{idirafter @var{dir}}
+@cindex preprocessing, include path
+Search @var{dir} for include files, but do it after all directories
+specified with @option{-I} and the standard system directories have
+been exhausted. @var{dir} is treated as a system include directory.
+If dir begins with @code{=}, then the @code{=} will be replaced by
+the sysroot prefix; see @option{--sysroot} and @option{-isysroot}.
+
+@item -imultilib @var{dir}
+@opindex @code{imultilib @var{dir}}
+@cindex preprocessing, include path
+Use @var{dir} as a subdirectory of the directory containing target-specific
+C++ headers.
+
+@item -iprefix @var{prefix}
+@opindex @code{iprefix @var{prefix}}
+@cindex preprocessing, include path
+Specify @var{prefix} as the prefix for subsequent @option{-iwithprefix}
+options. If the @var{prefix} represents a directory, you should include
+the final @code{'/'}.
+
+@item -isysroot @var{dir}
+@opindex @code{isysroot @var{dir}}
+@cindex preprocessing, include path
+This option is like the @option{--sysroot} option, but applies only to
+header files. See the @option{--sysroot} option for more information.
+
+@item -iquote @var{dir}
+@opindex @code{iquote @var{dir}}
+@cindex preprocessing, include path
+Search @var{dir} only for header files requested with @code{#include "file"};
+they are not searched for @code{#include <file>}, before all directories
+specified by @option{-I} and before the standard system directories. If
+@var{dir} begins with @code{=}, then the @code{=} will be replaced by the
+sysroot prefix; see @option{--sysroot} and @option{-isysroot}.
+
+@item -isystem @var{dir}
+@opindex @code{isystem @var{dir}}
+@cindex preprocessing, include path
+Search @var{dir} for header files, after all directories specified by
+@option{-I} but before the standard system directories. Mark it as a
+system directory, so that it gets the same special treatment as is
+applied to the standard system directories. If @var{dir} begins with
+@code{=}, then the @code{=} will be replaced by the sysroot prefix;
+see @option{--sysroot} and @option{-isysroot}.
+
+@item -nostdinc
+@opindex @code{nostdinc}
+Do not search the standard system directories for header files. Only
+the directories you have specified with @option{-I} options (and the
+directory of the current file, if appropriate) are searched.
+
+@item -undef
+@opindex @code{undef}
+Do not predefine any system-specific or GCC-specific macros.
+The standard predefined macros remain defined.
+
+@item -A@var{predicate}=@var{answer}
+@opindex @code{A@var{predicate}=@var{answer}}
+@cindex preprocessing, assertion
+Make an assertion with the predicate @var{predicate} and answer @var{answer}.
+This form is preferred to the older form -A predicate(answer), which is still
+supported, because it does not use shell special characters.
+
+@item -A-@var{predicate}=@var{answer}
+@opindex @code{A-@var{predicate}=@var{answer}}
+@cindex preprocessing, assertion
+Cancel an assertion with the predicate @var{predicate} and answer @var{answer}.
+
+@item -C
+@opindex @code{C}
+@cindex preprocessing, keep comments
+Do not discard comments. All comments are passed through to the output
+file, except for comments in processed directives, which are deleted
+along with the directive.
+
+You should be prepared for side effects when using @option{-C}; it causes
+the preprocessor to treat comments as tokens in their own right. For example,
+comments appearing at the start of what would be a directive line have the
+effect of turning that line into an ordinary source line, since the first
+token on the line is no longer a @code{'#'}.
+
+Warning: this currently handles C-Style comments only. The preprocessor
+does not yet recognize Fortran-style comments.
+
+@item -CC
+@opindex @code{CC}
+@cindex preprocessing, keep comments
+Do not discard comments, including during macro expansion. This is like
+@option{-C}, except that comments contained within macros are also passed
+through to the output file where the macro is expanded.
+
+In addition to the side-effects of the @option{-C} option, the @option{-CC}
+option causes all C++-style comments inside a macro to be converted to C-style
+comments. This is to prevent later use of that macro from inadvertently
+commenting out the remainder of the source line. The @option{-CC} option
+is generally used to support lint comments.
+
+Warning: this currently handles C- and C++-Style comments only. The
+preprocessor does not yet recognize Fortran-style comments.
+
+@item -D@var{name}
+@opindex @code{D@var{name}}
+@cindex preprocessing, define macros
+Predefine name as a macro, with definition @code{1}.
+
+@item -D@var{name}=@var{definition}
+@opindex @code{D@var{name}=@var{definition}}
+@cindex preprocessing, define macros
+The contents of @var{definition} are tokenized and processed as if they
+appeared during translation phase three in a @code{'#define'} directive.
+In particular, the definition will be truncated by embedded newline
+characters.
+
+If you are invoking the preprocessor from a shell or shell-like program
+you may need to use the shell's quoting syntax to protect characters such
+as spaces that have a meaning in the shell syntax.
+
+If you wish to define a function-like macro on the command line, write
+its argument list with surrounding parentheses before the equals sign
+(if any). Parentheses are meaningful to most shells, so you will need
+to quote the option. With sh and csh, @code{-D'name(args...)=definition'}
+works.
+
+@option{-D} and @option{-U} options are processed in the order they are
+given on the command line. All -imacros file and -include file options
+are processed after all -D and -U options.
+
+@item -H
+@opindex @code{H}
+Print the name of each header file used, in addition to other normal
+activities. Each name is indented to show how deep in the @code{'#include'}
+stack it is.
+
+@item -P
+@opindex @code{P}
+@cindex preprocessing, no linemarkers
+Inhibit generation of linemarkers in the output from the preprocessor.
+This might be useful when running the preprocessor on something that
+is not C code, and will be sent to a program which might be confused
+by the linemarkers.
+
+@item -U@var{name}
+@opindex @code{U@var{name}}
+@cindex preprocessing, undefine macros
+Cancel any previous definition of @var{name}, either built in or provided
+with a @option{-D} option.
+@end table
+
+
 @node Error and Warning Options
-@section Options to Request or Suppress Errors and Warnings
+@section Options to request or suppress errors and warnings
 @cindex options, warnings
 @cindex options, errors
 @cindex warnings, suppressing
@@ -374,9 +681,8 @@ These options control the amount and kinds of errors and warnings produced
 by GNU Fortran:
 
 @table @gcctabopt
-@item -fmax-errors-@var{n}
-@cindex @code{-fmax-errors-}@var{n} option
-@cindex option, @code{-fmax-errors-}@var{n}
+@item -fmax-errors=@var{n}
+@opindex @code{fmax-errors=}@var{n}
 @cindex errors, limiting
 Limits the maximum number of error messages to @var{n}, at which point
 GNU Fortran bails out rather than attempting to continue processing the
@@ -384,14 +690,14 @@ source code.  If @var{n} is 0, there is no limit on the number of error
 messages produced.
 
 @item -fsyntax-only
-@cindex @code{-fsyntax-only} option
-@cindex option, @code{-fsyntax-only}
+@opindex @code{fsyntax-only}
 @cindex syntax checking
-Check the code for syntax errors, but don't do anything beyond that.
+Check the code for syntax errors, but do not actually compile it.  This
+will generate module files for each module present in the code, but no
+other output file.
 
 @item -pedantic
-@cindex @code{-pedantic} option
-@cindex option, @code{-pedantic}
+@opindex @code{pedantic}
 Issue warnings for uses of extensions to Fortran 95.
 @option{-pedantic} also applies to C-language constructs where they
 occur in GNU Fortran source files, such as use of @samp{\e} in a
@@ -408,35 +714,29 @@ They soon find that it does not do quite what they want---it finds some
 nonstandard practices, but not all.
 However, improvements to GNU Fortran in this area are welcome.
 
-This should be used in conjunction with @option{-std=f95} or
-@option{-std=f2003}.
+This should be used in conjunction with @option{-std=f95},
+@option{-std=f2003} or @option{-std=f2008}.
 
 @item -pedantic-errors
-@cindex @code{-pedantic-errors} option
-@cindex option, @code{-pedantic-errors}
+@opindex @code{pedantic-errors}
 Like @option{-pedantic}, except that errors are produced rather than
 warnings.
 
-@item -w
-@cindex @code{-w} option
-@cindex option, @code{-w}
-Inhibit all warning messages.
-
 @item -Wall
-@cindex @code{-Wall} option
-@cindex option, @code{-Wall}
+@opindex @code{Wall}
 @cindex all warnings
 @cindex warnings, all
 Enables commonly used warning options pertaining to usage that
 we recommend avoiding and that we believe are easy to avoid.
-This currently includes @option{-Waliasing},
-@option{-Wampersand}, @option{-Wsurprising}, @option{-Wnonstd-intrinsics},
-@option{-Wno-tabs}, and @option{-Wline-truncation}.
+This currently includes @option{-Waliasing}, @option{-Wampersand}, 
+@option{-Wconversion}, @option{-Wsurprising}, @option{-Wintrinsics-std},
+@option{-Wno-tabs}, @option{-Wintrinsic-shadow}, @option{-Wline-truncation},
+@option{-Wreal-q-constant} and @option{-Wunused}.
 
 @item -Waliasing
-@cindex @code{-Waliasing} option
-@cindex option, @code{-Waliasing}
+@opindex @code{Waliasing}
 @cindex aliasing
+@cindex warnings, aliasing
 Warn about possible aliasing of dummy arguments. Specifically, it warns
 if the same actual argument is associated with a dummy argument with
 @code{INTENT(IN)} and a dummy argument with @code{INTENT(OUT)} in a call
@@ -456,43 +756,78 @@ The following example will trigger the warning.
 @end smallexample
 
 @item -Wampersand
-@cindex @code{-Wampersand} option
-@cindex option, @code{-Wampersand}
-@cindex ampersand
+@opindex @code{Wampersand}
+@cindex warnings, ampersand
+@cindex @code{&}
 Warn about missing ampersand in continued character constants. The warning is
-given with @option{-Wampersand}, @option{-pedantic}, @option{-std=f95}, and
-@option{-std=f2003}. Note: With no ampersand given in a continued character
-constant, GNU Fortran assumes continuation at the first non-comment,
-non-whitespace character after the ampersand that initiated the continuation.
+given with @option{-Wampersand}, @option{-pedantic}, @option{-std=f95},
+@option{-std=f2003} and @option{-std=f2008}. Note: With no ampersand
+given in a continued character constant, GNU Fortran assumes continuation
+at the first non-comment, non-whitespace character after the ampersand
+that initiated the continuation.
+
+@item -Warray-temporaries
+@opindex @code{Warray-temporaries}
+@cindex warnings, array temporaries
+Warn about array temporaries generated by the compiler.  The information
+generated by this warning is sometimes useful in optimization, in order to
+avoid such temporaries.
 
 @item -Wcharacter-truncation
-@cindex @code{-Wcharacter-truncation} option
-@cindex option, @code{-Wcharacter-truncation}
+@opindex @code{Wcharacter-truncation}
+@cindex warnings, character truncation
 Warn when a character assignment will truncate the assigned string.
 
+@item -Wline-truncation
+@opindex @code{Wline-truncation}
+@cindex warnings, line truncation
+Warn when a source code line will be truncated.
+
 @item -Wconversion
-@cindex @code{-Wconversion} option
-@cindex option, @code{-Wconversion}
+@opindex @code{Wconversion}
+@cindex warnings, conversion
+@cindex conversion
+Warn about implicit conversions that are likely to change the value of 
+the expression after conversion. Implied by @option{-Wall}.
+
+@item -Wconversion-extra
+@opindex @code{Wconversion-extra}
+@cindex warnings, conversion
 @cindex conversion
-Warn about implicit conversions between different types.
+Warn about implicit conversions between different types and kinds.
 
 @item -Wimplicit-interface
-@cindex @code{-Wimplicit-interface} option
-@cindex option, @code{-Wimplicit-interface}
+@opindex @code{Wimplicit-interface}
+@cindex warnings, implicit interface
 Warn if a procedure is called without an explicit interface.
 Note this only checks that an explicit interface is present.  It does not
 check that the declared interfaces are consistent across program units.
 
-@item -Wnonstd-intrinsics
-@cindex @code{-Wnonstd-intrinsics} option
-@cindex option, @code{-Wnonstd-intrinsics}
-Warn if the user tries to use an intrinsic that does not belong to the 
-standard the user has chosen via the @option{-std} option.
+@item -Wimplicit-procedure
+@opindex @code{Wimplicit-procedure}
+@cindex warnings, implicit procedure
+Warn if a procedure is called that has neither an explicit interface
+nor has been declared as @code{EXTERNAL}.
+
+@item -Wintrinsics-std
+@opindex @code{Wintrinsics-std}
+@cindex warnings, non-standard intrinsics
+@cindex warnings, intrinsics of other standards
+Warn if @command{gfortran} finds a procedure named like an intrinsic not
+available in the currently selected standard (with @option{-std}) and treats
+it as @code{EXTERNAL} procedure because of this.  @option{-fall-intrinsics} can
+be used to never trigger this behavior and always link to the intrinsic
+regardless of the selected standard.
+
+@item -Wreal-q-constant
+@opindex @code{Wreal-q-constant}
+@cindex warnings, @code{q} exponent-letter
+Produce a warning if a real-literal-constant contains a @code{q}
+exponent-letter.
 
 @item -Wsurprising
-@cindex @code{-Wsurprising} option
-@cindex option, @code{-Wsurprising}
-@cindex Suspicious code
+@opindex @code{Wsurprising}
+@cindex warnings, suspicious code
 Produce a warning when ``suspicious'' code constructs are encountered.
 While technically legal these usually indicate that an error has been made.
 
@@ -505,41 +840,85 @@ lower value is greater than its upper value.
 
 @item
 A LOGICAL SELECT construct has three CASE statements.
+
+@item
+A 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
+@option{-pedantic} or standard-conforming mode is enabled, this is an error.
+
+@item
+A @code{CHARACTER} variable is declared with negative length.
 @end itemize
 
 @item -Wtabs
-@cindex @code{-Wtabs} option
-@cindex option, @code{-Wtabs}
-@cindex Tabs
+@opindex @code{Wtabs}
+@cindex warnings, tabs
+@cindex tabulators
 By default, tabs are accepted as whitespace, but tabs are not members
-of the Fortran Character Set.  @option{-Wno-tabs} will cause a warning
-to be issued if a tab is encountered. Note, @option{-Wno-tabs} is active
-for @option{-pedantic}, @option{-std=f95}, @option{-std=f2003}, and
-@option{-Wall}.
+of the Fortran Character Set.  For continuation lines, a tab followed
+by a digit between 1 and 9 is supported.  @option{-Wno-tabs} will cause
+a warning to be issued if a tab is encountered. Note, @option{-Wno-tabs}
+is active for @option{-pedantic}, @option{-std=f95}, @option{-std=f2003},
+@option{-std=f2008} and @option{-Wall}.
 
 @item -Wunderflow
-@cindex @code{-Wunderflow} option
-@cindex option, @code{-Wunderflow}
-@cindex UNDERFLOW
+@opindex @code{Wunderflow}
+@cindex warnings, underflow
+@cindex underflow
 Produce a warning when numerical constant expressions are
 encountered, which yield an UNDERFLOW during compilation.
 
+@item -Wintrinsic-shadow
+@opindex @code{Wintrinsic-shadow}
+@cindex warnings, intrinsic
+@cindex intrinsic
+Warn if a user-defined procedure or module procedure has the same name as an
+intrinsic; in this case, an explicit interface or @code{EXTERNAL} or
+@code{INTRINSIC} declaration might be needed to get calls later resolved to
+the desired intrinsic/procedure.
+
+@item -Wunused-dummy-argument
+@opindex @code{Wunused-dummy-argument}
+@cindex warnings, unused dummy argument
+@cindex unused dummy argument
+@cindex dummy argument, unused
+Warn about unused dummy arguments. This option is implied by @option{-Wall}.
+
+@item -Wunused-parameter
+@opindex @code{Wunused-parameter}
+@cindex warnings, unused parameter
+@cindex unused parameter
+Contrary to @command{gcc}'s meaning of @option{-Wunused-parameter},
+@command{gfortran}'s implementation of this option does not warn
+about unused dummy arguments (see @option{-Wunused-dummy-argument}),
+but about unused @code{PARAMETER} values. @option{-Wunused-parameter}
+is not included in @option{-Wall} but is implied by @option{-Wall -Wextra}.
+
+@item -Walign-commons
+@opindex @code{Walign-commons}
+@cindex warnings, alignment of @code{COMMON} blocks
+@cindex alignment of @code{COMMON} blocks
+By default, @command{gfortran} warns about any occasion of variables being
+padded for proper alignment inside a @code{COMMON} block. This warning can be turned
+off via @option{-Wno-align-commons}. See also @option{-falign-commons}.
+
+@item -Wfunction-elimination
+@opindex @code{Wfunction-elimination}
+@cindex function elimination
+@cindex warnings, function elimination
+Warn if any calls to functions are eliminated by the optimizations
+enabled by the @option{-ffrontend-optimize} option.
+
+
 @item -Werror
-@cindex @code{-Werror} option
-@cindex option, @code{-Werror}
+@opindex @code{Werror}
+@cindex warnings, to errors
 Turns all warnings into errors.
-
-@item -W
-@cindex @code{-W} option
-@cindex option, @code{-W}
-@cindex extra warnings
-@cindex warnings, extra
-Turns on ``extra warnings'' and, if optimization is specified
-via @option{-O}, the @option{-Wuninitialized} option.
-(This might change in future versions of GNU Fortran.)
 @end table
 
-@xref{Error and Warning Options,,Options to Request or Suppress Errors and
+@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}
 and other GNU compilers.
@@ -547,7 +926,7 @@ and other GNU compilers.
 Some of these have no effect when compiling programs written in Fortran.
 
 @node Debugging Options
-@section Options for Debugging Your Program or GNU Fortran
+@section Options for debugging your program or GNU Fortran
 @cindex options, debugging
 @cindex debugging information options
 
@@ -555,42 +934,62 @@ GNU Fortran has various special options that are used for debugging
 either your program or the GNU Fortran compiler.
 
 @table @gcctabopt
-@item -fdump-parse-tree
-@cindex @code{-fdump-parse-tree} option
-@cindex option, @code{-fdump-parse-tree}
-Output the internal parse tree before starting code generation.  Only
-really useful for debugging the GNU Fortran compiler itself.
+@item -fdump-fortran-original
+@opindex @code{fdump-fortran-original}
+Output the internal parse tree after translating the source program
+into internal representation.  Only really useful for debugging the
+GNU Fortran compiler itself.
+
+@item -fdump-optimized-tree
+@opindex @code{fdump-fortran-optimized}
+Output the parse tree after front-end optimization.  Only really
+useful for debugging the GNU Fortran compiler itself.
+
+@opindex @code{fdump-parse-tree}
+Output the internal parse tree after translating the source program
+into internal representation.  Only really useful for debugging the
+GNU Fortran compiler itself.  This option is deprecated; use
+@code{-fdump-fortran-original} instead.
 
 @item -ffpe-trap=@var{list}
-@cindex @code{-ffpe-trap=}@var{list} option
-@cindex option, @code{-ffpe-trap=}@var{list}
-Specify a list of IEEE exceptions when a Floating Point Exception
-(FPE) should be raised.  On most systems, this will result in a SIGFPE
-signal being sent and the program being interrupted, producing a core
-file useful for debugging.  @var{list} is a (possibly empty) comma-separated
-list of the following IEEE exceptions: @samp{invalid} (invalid floating
-point operation, such as @code{SQRT(-1.0)}), @samp{zero} (division by
-zero), @samp{overflow} (overflow in a floating point operation),
-@samp{underflow} (underflow in a floating point operation),
-@samp{precision} (loss of precision during operation) and @samp{denormal}
-(operation produced a denormal value).
-
-@cindex -fbacktrace option
-@cindex options, -fbacktrace
-@item -fbacktrace
+@opindex @code{ffpe-trap=}@var{list}
+Specify a list of floating point exception traps to enable.  On most
+systems, if a floating point exception occurs and the trap for that
+exception is enabled, a SIGFPE signal will be sent and the program
+being aborted, producing a core file useful for debugging.  @var{list}
+is a (possibly empty) comma-separated list of the following
+exceptions: @samp{invalid} (invalid floating point operation, such as
+@code{SQRT(-1.0)}), @samp{zero} (division by zero), @samp{overflow}
+(overflow in a floating point operation), @samp{underflow} (underflow
+in a floating point operation), @samp{inexact} (loss of precision
+during operation), and @samp{denormal} (operation performed on a
+denormal value).  The first five exceptions correspond to the five
+IEEE 754 exceptions, whereas the last one (@samp{denormal}) is not
+part of the IEEE 754 standard but is available on some common
+architectures such as x86.
+
+The first three exceptions (@samp{invalid}, @samp{zero}, and
+@samp{overflow}) often indicate serious errors, and unless the program
+has provisions for dealing with these exceptions, enabling traps for
+these three exceptions is probably a good idea.
+
+Many, if not most, floating point operations incur loss of precision
+due to rounding, and hence the @code{ffpe-trap=inexact} is likely to
+be uninteresting in practice.
+
+By default no exception traps are enabled.
+
+@item -fno-backtrace
+@opindex @code{fno-backtrace}
 @cindex backtrace
 @cindex trace
-Specify that, when a runtime error is encountered, the Fortran runtime
-library should output a backtrace of the error.  This option
-only has influence for compilation of the Fortran main program.
-
-@cindex -fdump-core option
-@cindex options, -fdump-core
-@item -fdump-core
-@cindex core
-Request that a core-dump file is written to disk when a runtime error
-is encountered on systems that support core dumps. This option is
-only effective for the compilation of the Fortran main program.
+When a serious runtime error is encountered or a deadly signal is
+emitted (segmentation fault, illegal instruction, bus error,
+floating-point exception, and the other POSIX signals that have the
+action @samp{core}), the Fortran runtime library tries to output a
+backtrace of the error. @code{-fno-backtrace} disables the backtrace
+generation. This option only has influence for compilation of the
+Fortran main program.
 
 @end table
 
@@ -599,12 +998,12 @@ gcc,Using the GNU Compiler Collection (GCC)}, for more information on
 debugging options.
 
 @node Directory Options
-@section Options for Directory Search
+@section Options for directory search
 @cindex directory, options
 @cindex options, directory search
 @cindex search path
-@cindex INCLUDE directive
-@cindex directive, INCLUDE
+@cindex @code{INCLUDE} directive
+@cindex directive, @code{INCLUDE}
 These options affect how GNU Fortran searches
 for files specified by the @code{INCLUDE} directive and where it searches
 for previously compiled modules.
@@ -614,8 +1013,7 @@ Fortran source.
 
 @table @gcctabopt
 @item -I@var{dir}
-@cindex @code{-I}@var{dir} option
-@cindex option, @code{-I}@var{dir}
+@opindex @code{I}@var{dir}
 @cindex directory, search paths for inclusion
 @cindex inclusion, directory search paths for
 @cindex search paths, for included files
@@ -637,12 +1035,9 @@ compiled modules are required by a @code{USE} statement.
 gcc,Using the GNU Compiler Collection (GCC)}, for information on the
 @option{-I} option.
 
-@item -M@var{dir}
 @item -J@var{dir}
-@cindex @code{-M}@var{dir} option
-@cindex option, @code{-M}@var{dir}
-@cindex @code{-J}@var{dir} option
-@cindex option, @code{-J}@var{dir}
+@opindex @code{J}@var{dir}
+@opindex @code{M}@var{dir}
 @cindex paths, search
 @cindex module search path
 This option specifies where to put @file{.mod} files for compiled modules.
@@ -651,27 +1046,42 @@ statement.
 
 The default is the current directory.
 
-@option{-J} is an alias for @option{-M} to avoid conflicts with existing
-GCC options.
-
 @item -fintrinsic-modules-path @var{dir}
-@cindex @code{-fintrinsic-modules-path} @var{dir} option
-@cindex option, @code{-fintrinsic-modules-path}@var{dir}
+@opindex @code{fintrinsic-modules-path} @var{dir}
 @cindex paths, search
 @cindex module search path
 This option specifies the location of pre-compiled intrinsic modules, if
 they are not in the default location expected by the compiler.
 @end table
 
+@node Link Options
+@section Influencing the linking step
+@cindex options, linking
+@cindex linking, static
+
+These options come into play when the compiler links object files into an 
+executable output file. They are meaningless if the compiler is not doing 
+a link step.
+
+@table @gcctabopt
+@item -static-libgfortran
+@opindex @code{static-libgfortran}
+On systems that provide @file{libgfortran} as a shared and a static
+library, this option forces the use of the static version. If no
+shared version of @file{libgfortran} was built when the compiler was
+configured, this option has no effect.
+@end table
+
+
 @node Runtime Options
 @section Influencing runtime behavior
-@cindex runtime, options
+@cindex options, runtime
 
 These options affect the runtime behavior of programs compiled with GNU Fortran.
+
 @table @gcctabopt
 @item -fconvert=@var{conversion}
-@cindex @code{-fconvert=}@var{conversion} option
-@cindex option, @code{-fconvert=}@var{conversion}
+@opindex @code{fconvert=}@var{conversion}
 Specify the representation of data for unformatted files.  Valid
 values for conversion are: @samp{native}, the default; @samp{swap},
 swap between big- and little-endian; @samp{big-endian}, use big-endian
@@ -682,29 +1092,46 @@ representation for unformatted files.
 The @code{CONVERT} specifier and the GFORTRAN_CONVERT_UNIT environment
 variable override the default specified by @option{-fconvert}.}
 
+
+@item -fno-range-check
+@opindex @code{fno-range-check}
+Disable range checking of input values during integer @code{READ} operations.
+For example, GNU Fortran will give an error if an input value is
+outside of the relevant range of [@code{-HUGE()}:@code{HUGE()}]. In other words,
+with @code{INTEGER (kind=4) :: i} , attempting to read @math{-2147483648} will
+give an error unless @option{-fno-range-check} is given. 
+
+
 @item -frecord-marker=@var{length}
-@cindex @code{-frecord-marker=}@var{length} option
-@cindex option, @code{-frecord-marker=}@var{length}
+@opindex @code{frecord-marker=}@var{length}
 Specify the length of record markers for unformatted files.
 Valid values for @var{length} are 4 and 8.  Default is 4.
-@emph{This is different from previous versions of gfortran},
+@emph{This is different from previous versions of @command{gfortran}},
 which specified a default record marker length of 8 on most
 systems.  If you want to read or write files compatible
-with earlier versions of gfortran, use @option{-frecord-marker=8}.
+with earlier versions of @command{gfortran}, use @option{-frecord-marker=8}.
 
 @item -fmax-subrecord-length=@var{length}
-@cindex @code{-fmax-subrecord-length=}@var{length} option
-@cindex option, @code{-fmax-subrecord-length=}@var{length}
+@opindex @code{fmax-subrecord-length=}@var{length}
 Specify the maximum length for a subrecord.  The maximum permitted
 value for length is 2147483639, which is also the default.  Only
 really useful for use by the gfortran testsuite.
+
+@item -fsign-zero
+@opindex @code{fsign-zero}
+When enabled, floating point numbers of value zero with the sign bit set
+are written as negative number in formatted output and treated as
+negative in the @code{SIGN} intrinsic.  @option{-fno-sign-zero} does not
+print the negative sign of zero values (or values rounded to zero for I/O)
+and regards zero as positive number in the @code{SIGN} intrinsic for
+compatibility with Fortran 77. The default is @option{-fsign-zero}.
 @end table
 
 @node Code Gen Options
-@section Options for Code Generation Conventions
+@section Options for code generation conventions
 @cindex code generation, conventions
 @cindex options, code generation
-@cindex run-time, options
+@cindex options, run-time
 
 These machine-independent options control the interface conventions
 used in code generation.
@@ -717,18 +1144,19 @@ it.
 
 @table @gcctabopt
 @item -fno-automatic
-@cindex @code{-fno-automatic} option
-@cindex option, @code{-fno-automatic}
-@cindex SAVE statement
-@cindex statements, SAVE
-Treat each program unit as if the @code{SAVE} statement was 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}.)
+@opindex @code{fno-automatic}
+@cindex @code{SAVE} statement
+@cindex statement, @code{SAVE}
+Treat each program unit (except those marked as 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}.)
+The default, which is @option{-fautomatic}, uses the stack for local
+variables smaller than the value given by @option{-fmax-stack-var-size}.
+Use the option @option{-frecursive} to use no static memory. 
 
 @item -ff2c
-@cindex @code{-ff2c} option
-@cindex option, @code{-ff2c}
+@opindex ff2c
 @cindex calling convention
 @cindex @command{f2c} calling convention
 @cindex @command{g77} calling convention
@@ -762,8 +1190,7 @@ of type default @code{REAL} or @code{COMPLEX} as actual arguments, as
 the library implementations use the @option{-fno-f2c} calling conventions.
 
 @item -fno-underscoring
-@cindex @code{-fno-underscoring option}
-@cindex option, @code{-fno-underscoring}
+@opindex @code{fno-underscoring}
 @cindex underscore
 @cindex symbol names, underscores
 @cindex transforming symbol names
@@ -783,8 +1210,8 @@ tools.
 
 Use of @option{-fno-underscoring} is not recommended unless you are
 experimenting with issues such as integration of GNU Fortran into
-existing system environments (vis-a-vis existing libraries, tools, and
-so on).
+existing system environments (vis-@`{a}-vis existing libraries, tools,
+and so on).
 
 For example, with @option{-funderscoring}, and assuming other defaults like
 @option{-fcase-lower} and that @code{j()} and @code{max_count()} are
@@ -832,9 +1259,24 @@ in the source, even if the names as seen by the linker are mangled to
 prevent accidental linking between procedures with incompatible
 interfaces.
 
+@item -fno-whole-file
+@opindex @code{fno-whole-file}
+This flag causes the compiler to resolve and translate each procedure in
+a file separately. 
+
+By default, the whole file is parsed and placed in a single front-end tree.
+During resolution, in addition to all the usual checks and fixups, references
+to external procedures that are in the same file effect resolution of
+that procedure, if not already done, and a check of the interfaces.  The
+dependences are resolved by changing the order in which the file is
+translated into the backend tree.  Thus, a procedure that is referenced
+is translated before the reference and the duplication of backend tree
+declarations eliminated.
+
+The @option{-fno-whole-file} option is deprecated and may lead to wrong code.
+
 @item -fsecond-underscore
-@cindex @code{-fsecond-underscore option}
-@cindex option, @code{-fsecond-underscore}
+@opindex @code{fsecond-underscore}
 @cindex underscore
 @cindex symbol names, underscores
 @cindex transforming symbol names
@@ -858,27 +1300,122 @@ is implemented as a reference to the link-time external symbol
 for compatibility with @command{g77} and @command{f2c}, and is implied
 by use of the @option{-ff2c} option.
 
-@item -fbounds-check
-@cindex @code{-fbounds-check} option
-@cindex option, @code{-fbounds-check}
+@item -fcoarray=@var{<keyword>}
+@opindex @code{fcoarray}
+@cindex coarrays
+
+@table @asis
+@item @samp{none}
+Disable coarray support; using coarray declarations and image-control
+statements will produce a compile-time error. (Default)
+
+@item @samp{single}
+Single-image mode, i.e. @code{num_images()} is always one.
+
+@item @samp{lib}
+Library-based coarray parallelization; a suitable GNU Fortran coarray
+library needs to be linked.
+@end table
+
+
+@item -fcheck=@var{<keyword>}
+@opindex @code{fcheck}
+@cindex array, bounds checking
 @cindex bounds checking
+@cindex pointer checking
+@cindex memory checking
 @cindex range checking
-@cindex array bounds checking
 @cindex subscript checking
 @cindex checking subscripts
+@cindex run-time checking
+@cindex checking array temporaries
+
+Enable the generation of run-time checks; the argument shall be
+a comma-delimited list of the following keywords.
+
+@table @asis
+@item @samp{all}
+Enable all run-time test of @option{-fcheck}.
+
+@item @samp{array-temps}
+Warns at run time when for passing an actual argument a temporary array
+had to be generated. The information generated by this warning is
+sometimes useful in optimization, in order to avoid such temporaries.
+
+Note: The warning is only printed once per location.
+
+@item @samp{bounds}
 Enable generation of run-time checks for array subscripts
 and against the declared minimum and maximum values.  It also
 checks array indices for assumed and deferred
-shape arrays against the actual allocated bounds.
+shape arrays against the actual allocated bounds and ensures that all string
+lengths are equal for character array constructors without an explicit
+typespec.
+
+Some checks require that @option{-fcheck=bounds} is set for
+the compilation of the main program.
+
+Note: In the future this may also include other forms of checking, e.g.,
+checking substring references.
+
+@item @samp{do}
+Enable generation of run-time checks for invalid modification of loop
+iteration variables.
+
+@item @samp{mem}
+Enable generation of run-time checks for memory allocation.
+Note: This option does not affect explicit allocations using the
+@code{ALLOCATE} statement, which will be always checked.
+
+@item @samp{pointer}
+Enable generation of run-time checks for pointers and allocatables.
+
+@item @samp{recursion}
+Enable generation of run-time checks for recursively called subroutines and
+functions which are not marked as recursive. See also @option{-frecursive}.
+Note: This check does not work for OpenMP programs and is disabled if used
+together with @option{-frecursive} and @option{-fopenmp}.
+@end table
+
+
+@item -fbounds-check
+@opindex @code{fbounds-check}
+@c Note: This option is also referred in gcc's manpage
+Deprecated alias for @option{-fcheck=bounds}.
+
+@item -fcheck-array-temporaries
+@opindex @code{fcheck-array-temporaries}
+Deprecated alias for @option{-fcheck=array-temps}.
+
+@item -fmax-array-constructor=@var{n}
+@opindex @code{fmax-array-constructor}
+This option can be used to increase the upper limit permitted in 
+array constructors.  The code below requires this option to expand
+the array at compile time.
+
+@smallexample
+program test
+implicit none
+integer j
+integer, parameter :: n = 100000
+integer, parameter :: i(n) = (/ (2*j, j = 1, n) /)
+print '(10(I0,1X))', i
+end program test
+@end smallexample
+
+@emph{Caution:  This option can lead to long compile times and excessively
+large object files.}
+
+The default value for @var{n} is 65535.
 
-In the future this may also include other forms of checking, e.g., checking
-substring references.
 
 @item -fmax-stack-var-size=@var{n}
-@cindex @code{-fmax-stack-var-size} option
-@cindex option, @code{-fmax-stack-var-size}
+@opindex @code{fmax-stack-var-size}
 This option specifies the size in bytes of the largest array that will be put
-on the stack.
+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
+for parallel programs. Use @option{-fno-automatic} to never use the stack.
 
 This option currently only affects local arrays declared with constant
 bounds, and may not apply to all character variables.
@@ -886,18 +1423,25 @@ Future versions of GNU Fortran may improve this behavior.
 
 The default value for @var{n} is 32768.
 
+@item -fstack-arrays
+@opindex @code{fstack-arrays}
+Adding this option will make the fortran compiler put all local arrays,
+even those of unknown size onto stack memory.  If your program uses very
+large local arrays it is possible that you will have to extend your runtime
+limits for stack memory on some operating systems. This flag is enabled
+by default at optimization level @option{-Ofast}.
+
+
 @item -fpack-derived
-@cindex @code{-fpack-derived} option
-@cindex option, @code{-fpack-derived}
-@cindex Structure packing
+@opindex @code{fpack-derived}
+@cindex structure packing
 This option tells GNU Fortran to pack derived type members as closely as
 possible.  Code compiled with this option is likely to be incompatible
 with code compiled without this option, and may execute slower.
 
 @item -frepack-arrays
-@cindex @code{-frepack-arrays} option
-@cindex option, @code{-frepack-arrays}
-@cindex Repacking arrays
+@opindex @code{frepack-arrays}
+@cindex repacking arrays
 In some circumstances GNU Fortran may pass assumed shape array
 sections via a descriptor describing a noncontiguous area of memory.
 This option adds code to the function prologue to repack the data into
@@ -908,26 +1452,23 @@ significant overhead to the function call, especially  when the passed data
 is noncontiguous.
 
 @item -fshort-enums
-@cindex @code{-fshort-enums} option
-@cindex option, @code{-fshort-enums}
+@opindex @code{fshort-enums}
 This option is provided for interoperability with C code that was
 compiled with the @option{-fshort-enums} option.  It will make
 GNU Fortran choose the smallest @code{INTEGER} kind a given
 enumerator set will fit in, and give all its enumerators this kind.
 
 @item -fexternal-blas
-@cindex @code{-fexternal-blas} option
-@cindex option, @code{-fexternal-blas}
-This option will make gfortran generate calls to BLAS functions for some
-matrix operations like @code{MATMUL}, instead of using our own
+@opindex @code{fexternal-blas}
+This option will make @command{gfortran} generate calls to BLAS functions
+for some matrix operations like @code{MATMUL}, instead of using our own
 algorithms, if the size of the matrices involved is larger than a given
 limit (see @option{-fblas-matmul-limit}).  This may be profitable if an
 optimized vendor BLAS library is available.  The BLAS library will have
 to be specified at link time.
 
 @item -fblas-matmul-limit=@var{n}
-@cindex @code{-fblas-matmul-limit} option
-@cindex option, @code{-fblas-matmul-limit}
+@opindex @code{fblas-matmul-limit}
 Only significant when @option{-fexternal-blas} is in effect.
 Matrix multiplication of matrices with size larger than (or equal to) @var{n}
 will be performed by calls to BLAS functions, while others will be
@@ -937,6 +1478,105 @@ geometric mean of the dimensions of the argument and result matrices.
 
 The default value for @var{n} is 30.
 
+@item -frecursive
+@opindex @code{frecursive}
+Allow indirect recursion by forcing all local arrays to be allocated
+on the stack. This flag cannot be used together with
+@option{-fmax-stack-var-size=} or @option{-fno-automatic}.
+
+@item -finit-local-zero
+@itemx -finit-integer=@var{n}
+@itemx -finit-real=@var{<zero|inf|-inf|nan|snan>}
+@itemx -finit-logical=@var{<true|false>}
+@itemx -finit-character=@var{n}
+@opindex @code{finit-local-zero}
+@opindex @code{finit-integer}
+@opindex @code{finit-real}
+@opindex @code{finit-logical}
+@opindex @code{finit-character}
+The @option{-finit-local-zero} option instructs the compiler to
+initialize local @code{INTEGER}, @code{REAL}, and @code{COMPLEX}
+variables to zero, @code{LOGICAL} variables to false, and
+@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
+the real and imaginary parts of local @code{COMPLEX} variables),
+@option{-finit-logical=@var{<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
+allocatable arrays
+@item
+components of derived type variables
+@item
+variables that appear in an @code{EQUIVALENCE} statement.
+@end itemize
+(These limitations may be removed in future releases).
+
+Note that the @option{-finit-real=nan} option initializes @code{REAL}
+and @code{COMPLEX} variables with a quiet NaN. For a signalling NaN
+use @option{-finit-real=snan}; note, however, that compile-time
+optimizations may convert them into quiet NaN and that trapping
+needs to be enabled (e.g. via @option{-ffpe-trap}).
+
+Finally, note that enabling any of the @option{-finit-*} options will
+silence warnings that would have been emitted by @option{-Wuninitialized}
+for the affected local variables.
+
+@item -falign-commons
+@opindex @code{falign-commons}
+@cindex alignment of @code{COMMON} blocks
+By default, @command{gfortran} enforces proper alignment of all variables in a
+@code{COMMON} block by padding them as needed. On certain platforms this is mandatory,
+on others it increases performance. If a @code{COMMON} block is not declared with
+consistent data types everywhere, this padding can cause trouble, and
+@option{-fno-align-commons} can be used to disable automatic alignment. The
+same form of this option should be used for all files that share a @code{COMMON} block.
+To avoid potential alignment issues in @code{COMMON} blocks, it is recommended to order
+objects from largest to smallest.
+
+@item -fno-protect-parens
+@opindex @code{fno-protect-parens}
+@cindex re-association of parenthesized expressions
+By default the parentheses in expression are honored for all optimization
+levels such that the compiler does not do any re-association. Using
+@option{-fno-protect-parens} allows the compiler to reorder @code{REAL} and
+@code{COMPLEX} expressions to produce faster code. Note that for the re-association
+optimization @option{-fno-signed-zeros} and @option{-fno-trapping-math}
+need to be in effect. The parentheses protection is enabled by default, unless
+@option{-Ofast} is given.
+
+@item -frealloc-lhs
+@opindex @code{frealloc-lhs}
+@cindex Reallocate the LHS in assignments
+An allocatable left-hand side of an intrinsic assignment is automatically
+(re)allocated if it is either unallocated or has a different shape. The
+option is enabled by default except when @option{-std=f95} is given.
+
+@item -faggressive-function-elimination
+@opindex @code{faggressive-function-elimination}
+@cindex Elimination of functions with identical argument lists
+Functions with identical argument lists are eliminated within
+statements, regardless of whether these functions are marked
+@code{PURE} or not. For example, in
+@smallexample
+  a = f(b,c) + f(b,c)
+@end smallexample
+there will only be a single call to @code{f}.  This option only works
+if @option{-ffrontend-optimize} is in effect.
+
+@item -ffrontend-optimize
+@opindex @code{frontend-optimize}
+@cindex Front-end optimization
+This option performs front-end optimization, based on manipulating
+parts the Fortran parse tree.  Enabled by default by any @option{-O}
+option.  Optimizations enabled by this option include elimination of
+identical function calls within expressions, removing unnecessary
+calls to @code{TRIM} in comparisons and assignments and replacing
+@code{TRIM(a)} with @code{a(1:LEN_TRIM(a))}. 
+It can be deselected by specifying @option{-fno-frontend-optimize}.
 @end table
 
 @xref{Code Gen Options,,Options for Code Generation Conventions,
@@ -944,12 +1584,11 @@ gcc,Using the GNU Compiler Collection (GCC)}, for information on more options
 offered by the GBE
 shared by @command{gfortran}, @command{gcc}, and other GNU compilers.
 
-
 @c man end
 
 @node Environment Variables
-@section Environment Variables Affecting @command{gfortran}
-@cindex environment variables
+@section Environment variables affecting @command{gfortran}
+@cindex environment variable
 
 @c man begin ENVIRONMENT