OSDN Git Service

gcc/
[pf3gnuchains/gcc-fork.git] / gcc / fortran / invoke.texi
index 7ffd7af..2bac12c 100644 (file)
@@ -1,11 +1,11 @@
-@c Copyright (C) 2004
+@c Copyright (C) 2004, 2005, 2006, 2007, 2008
 @c Free Software Foundation, Inc.
-@c This is part of the GFORTRAN manual.   
+@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
+Copyright @copyright{} 2004, 2005, 2006, 2007
 Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
@@ -28,7 +28,7 @@ included in the gfdl(7) man page.
 @c man end
 @c Set file name and title for the man page.
 @setfilename gfortran
-@settitle GNU Fortran 95 compiler.
+@settitle GNU Fortran compiler.
 @c man begin SYNOPSIS
 gfortran [@option{-c}|@option{-S}|@option{-E}]
          [@option{-g}] [@option{-pg}] [@option{-O}@var{level}]
@@ -50,24 +50,24 @@ 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
-GFORTRAN@.
+GNU Fortran.
 @c man end
 @end ignore
 
-@node Invoking GFORTRAN
-@chapter GNU Fortran 95 Command Options
-@cindex GNU Fortran 95 command options
+@node Invoking GNU Fortran
+@chapter GNU Fortran Command Options
+@cindex GNU Fortran command options
 @cindex command options
-@cindex options, GNU Fortran 95 command
+@cindex options, @command{gfortran} command
 
 @c man begin DESCRIPTION
 
 The @command{gfortran} command supports all the options supported by the
-@command{gcc} command.  Only options specific to gfortran 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,13 +75,12 @@ 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 @command{gcc} and @command{gfortran} 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,
 such as @command{g++}),
-since adding @command{gfortran} to the @command{gcc} distribution
-enables acceptance of @command{gfortran} options
+since adding GNU Fortran to the GCC distribution
+enables acceptance of GNU Fortran options
 by all of the relevant drivers.
 
 In some cases, options have positive and negative forms;
@@ -95,16 +94,18 @@ one is not the default.
                         without explanations.
 * Fortran Dialect Options::  Controlling the variant of Fortran language
                              compiled.
-* Warning Options::     How picky should the compiler be?
+* 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 GNU Fortran.
+* Environment Variables:: Environment variables that affect @command{gfortran}.
 @end menu
 
 @node Option Summary
-@section Option Summary
+@section Option summary
 
 @c man begin OPTIONS
 
@@ -113,155 +114,247 @@ by type.  Explanations are in the following sections.
 
 @table @emph
 @item Fortran Language Options
-@xref{Fortran Dialect Options,,Options Controlling Fortran Dialect}.
-@gccoptlist{
--ffree-form  -fno-fixed-form @gol
+@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}
+-std=@var{std} -fd-lines-as-code  -fd-lines-as-comments @gol
 -ffixed-line-length-@var{n}  -ffixed-line-length-none @gol
--fdefault-double-8  -fdefault-integer-8  -fdefault-real-8 }
-
-@item Warning Options
-@xref{Warning Options,,Options to Request or Suppress Warnings}.
-@gccoptlist{
+-ffree-line-length-@var{n}  -ffree-line-length-none @gol
+-fdefault-double-8  -fdefault-integer-8  -fdefault-real-8 @gol
+-fcray-pointer  -fopenmp  -fno-range-check -fbackslash -fmodule-private}
+
+@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  -Wconversion @gol
--Wimplicit-interface  -Wnonstd-intrinsics  -Wsurprising  -Wunderflow @gol
--Wunused-labels -Wline-truncation @gol
--Werror  -W}
+-Wall  -Waliasing  -Wampersand  -Wcharacter-truncation  -Wconversion @gol
+-Wimplicit-interface  -Wline-truncation  -Wnonstd-intrinsics  -Wsurprising @gol
+-Wno-tabs  -Wunderflow -Wunused-parameter}
 
 @item Debugging Options
-@xref{Debugging Options,,Options for Debugging Your Program or GCC}.
-@gccoptlist{
--fdump-parse-tree}
+@xref{Debugging Options,,Options for debugging your program or GNU Fortran}.
+@gccoptlist{-fdump-parse-tree  -ffpe-trap=@var{list} @gol
+-fdump-core -fbacktrace}
 
 @item Directory Options
-@xref{Directory Options,,Options for Directory Search}.
-@gccoptlist{
--I@var{dir}  -M@var{dir}}
+@xref{Directory Options,,Options for directory search}.
+@gccoptlist{-I@var{dir}  -J@var{dir}  -M@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}  -fsign-zero}
 
 @item Code Generation Options
-@xref{Code Gen Options,,Options for Code Generation Conventions}.
-@gccoptlist{
--fno-underscoring  -fno-second-underscore @gol
+@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
--fpackderived  -frepack-arrays}
+-fpack-derived  -frepack-arrays  -fshort-enums  -fexternal-blas @gol
+-fblas-matmul-limit=@var{n} -frecursive -finit-local-zero @gol
+-finit-integer=@var{n} -finit-real=@var{<zero|inf|-inf|nan>} @gol
+-finit-logical=@var{<true|false>} -finit-character=@var{n}}
 @end table
 
 @menu
 * Fortran Dialect Options::  Controlling the variant of Fortran language
                              compiled.
-* Warning Options::     How picky should the compiler be?
+* 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.
 @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
 
-The following options control the dialect of Fortran
-that the compiler accepts:
+The following options control the details of the Fortran dialect
+accepted by the compiler:
 
 @table @gcctabopt
-@cindex -ffree-form option
-@cindex options, -ffree-form
-@cindex -fno-fixed-form option
-@cindex options, -fno-fixed-form
-@cindex source file format
-@cindex free form
-@cindex fixed form
-@cindex Source Form
-@cindex Fortran 90, features
 @item -ffree-form
 @item -ffixed-form
-Specify the layout used by the the source file. The free form layout
+@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.
+older Fortran programs.  When neither option is specified, the source
+form is determined by the file extension.
+
+@item -fall-intrinsics
+@opindex @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}.
+
+@item -fd-lines-as-code
+@item -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
+@option{-fd-lines-as-comments} option is given, they are treated as
+comment lines.
 
-@cindex option, -fdefault-double-8
-@cindex -fdefault-double-8, option
 @item -fdefault-double-8
-Set the "DOUBLE PRECISION" type to an 8 byte wide.
+@opindex @code{fdefault-double-8}
+Set the @code{DOUBLE PRECISION} type to an 8 byte wide type.
 
-@cindex option, -fdefault-integer-8
-@cindex -fdefault-integer-8, option
 @item -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.
 
-@cindex option, -fdefault-real-8
-@cindex -fdefault-real-8, option
 @item -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.
 
-@cindex -fdollar-ok option
-@cindex options, -fdollar-ok
 @item -fdollar-ok
-@cindex dollar sign
+@opindex @code{fdollar-ok}
+@cindex $
 @cindex symbol names
 @cindex character set
 Allow @samp{$} as a valid character in a symbol name.
 
-@cindex -ffixed-line-length-@var{n} option
-@cindex options, -ffixed-line-length-@var{n}
+@item -fbackslash
+@opindex @code{backslash}
+@cindex backslash
+@cindex escape characters
+Change the interpretation of backslashes in string literals
+from a single backslash character to ``C-style'' escape characters.
+The following combinations are expanded \a, \b, \f, \n, \r, \t,
+\v, \\, and \0 to the ASCII characters alert, backspace, form feed,
+newline, carriage return, horizontal tab, vertical tab, backslash,
+and NUL, respectively.  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 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 (corresponds
+standard and the default), 80 (card image), and 132 (corresponding
 to ``extended-source'' options in some popular compilers).
-@var{n} may be @samp{none}, meaning that the entire line is meaningful
+@var{n} may also be @samp{none}, meaning that the entire line is meaningful
 and that continued character constants never have implicit spaces appended
 to them to fill out the line.
 @option{-ffixed-line-length-0} means the same thing as
 @option{-ffixed-line-length-none}.
 
-@cindex -fmax-identifier-length=@var{n} option
-@cindex option -fmax-identifier-length=@var{n}
+@item -ffree-line-length-@var{n}
+@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.
+@option{-ffree-line-length-0} means the same thing as
+@option{-ffree-line-length-none}.
+
 @item -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 200x).
+31 (Fortran 95) and 63 (Fortran 2003 and Fortran 2008).
 
-@cindex -fimplicit-none option
-@cindex options, -fimplicit-none
 @item -fimplicit-none
+@opindex @code{fimplicit-none}
 Specify that no implicit typing is allowed, unless overridden by explicit
-@samp{IMPLICIT} statements.  This is the equivalent of adding
-@samp{implicit none} to the start of every procedure.
+@code{IMPLICIT} statements.  This is the equivalent of adding
+@code{implicit none} to the start of every procedure.
+
+@item -fcray-pointer
+@opindex @code{fcray-pointer}
+Enable the Cray pointer extension, which provides C-like pointer
+functionality.
+
+@item -fopenmp
+@opindex @code{fopenmp}
+@cindex OpenMP
+Enable the OpenMP extensions.  This includes OpenMP @code{!$omp} directives
+in free form
+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.  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.
 
-@cindex -std=@var{std} option
-@cindex option, -std=@var{std}
 @item -std=@var{std}
-Conform to the specified standard.  Allowed values for @var{std} are
-@samp{gnu} and @samp{f95}.
+@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{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.
 
 @end table
 
-@node Warning Options
-@section Options to Request or Suppress Warnings
+@node Error and Warning Options
+@section Options to request or suppress errors and warnings
 @cindex options, warnings
+@cindex options, errors
 @cindex warnings, suppressing
+@cindex messages, error
 @cindex messages, warning
 @cindex suppressing warnings
 
+Errors are diagnostic messages that report that the GNU Fortran compiler
+cannot compile the relevant piece of source code.  The compiler will
+continue to process the program in an attempt to report further errors
+to aid in debugging, but will not produce any compiled output.  
+
 Warnings are diagnostic messages that report constructions which
-are not inherently erroneous but which are risky or suggest there
-might have been an error.
+are not inherently erroneous but which are risky or suggest there is
+likely to be a bug in the program.  Unless @option{-Werror} is specified,
+they do not prevent compilation of the program.
 
 You can request many specific warnings with options beginning @option{-W},
 for example @option{-Wimplicit} to request warnings on implicit
@@ -270,25 +363,33 @@ negative form beginning @option{-Wno-} to turn off warnings;
 for example, @option{-Wno-implicit}.  This manual lists only one of the
 two forms, whichever is not the default.
 
-These options control the amount and kinds of warnings produced by GNU
-Fortran:
+These options control the amount and kinds of errors and warnings produced
+by GNU Fortran:
 
 @table @gcctabopt
-@cindex syntax checking
-@cindex -fsyntax-only option
-@cindex options, -fsyntax-only
+@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
+source code.  If @var{n} is 0, there is no limit on the number of error
+messages produced.
+
 @item -fsyntax-only
-Check the code for syntax errors, but don't do anything beyond that.
+@opindex @code{fsyntax-only}
+@cindex syntax checking
+Check the code for syntax errors, but don't actually compile it.  This
+will generate module files for each module present in the code, but no
+other output file.
 
-@cindex -pedantic option
-@cindex options, -pedantic
 @item -pedantic
-Issue warnings for uses of extensions to FORTRAN 95.
+@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
-character constant within a directive like @samp{#include}.
+character constant within a directive like @code{#include}.
 
-Valid FORTRAN 95 programs should compile properly with or without
+Valid Fortran 95 programs should compile properly with or without
 this option.
 However, without this option, certain GNU extensions and traditional
 Fortran features are supported as well.
@@ -297,73 +398,91 @@ With this option, many of them are rejected.
 Some users try to use @option{-pedantic} to check programs for conformance.
 They soon find that it does not do quite what they want---it finds some
 nonstandard practices, but not all.
-However, improvements to @command{gfortran} in this area are welcome.
+However, improvements to GNU Fortran in this area are welcome.
 
-This should be used in conjunction with -std=@var{std}.
+This should be used in conjunction with @option{-std=f95},
+@option{-std=f2003} or @option{-std=f2008}.
 
-@cindex -pedantic-errors option
-@cindex options, -pedantic-errors
 @item -pedantic-errors
+@opindex @code{pedantic-errors}
 Like @option{-pedantic}, except that errors are produced rather than
 warnings.
 
-@cindex -w option
-@cindex options, -w
-@item -w
-Inhibit all warning messages.
-
-
-@cindex -Wall option
-@cindex options, -Wall
 @item -Wall
+@opindex @code{Wall}
 @cindex all warnings
 @cindex warnings, all
-Enables commonly used warning options that which pertain to usage that
-we recommend avoiding and that we believe is easy to avoid.
-This currently includes @option{-Wunused-labels}, @option{-Waliasing},
-@option{-Wsurprising}, @option{-Wnonstd-intrinsic} and
-@option{-Wline-truncation}.
-
+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}.
 
-@cindex -Waliasing option
-@cindex options, -Waliasing
 @item -Waliasing
+@opindex @code{Waliasing}
 @cindex aliasing
-Warn about possible aliasing of dummy arguments. The following example
-will trigger the warning as it would be illegal to @code{bar} to
-modify either parameter.
+@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
+with an explicit interface.
+
+The following example will trigger the warning.
 @smallexample
-  INTEGER A
-  CALL BAR(A,A)
+  interface
+    subroutine bar(a,b)
+      integer, intent(in) :: a
+      integer, intent(out) :: b
+    end subroutine
+  end interface
+  integer :: a
+
+  call bar(a,a)
 @end smallexample
 
+@item -Wampersand
+@opindex @code{Wampersand}
+@cindex warnings, ampersand
+@cindex &
+Warn about missing ampersand in continued character constants. The warning is
+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 -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.
 
-@cindex -Wconversion option
-@cindex options, -Wconversion
 @item -Wconversion
+@opindex @code{Wconversion}
+@cindex warnings, conversion
 @cindex conversion
 Warn about implicit conversions between different types.
 
-
-@cindex -Wimplicit-interface option
-@cindex options, -Wimplicit-interface
 @item -Wimplicit-interface
-Warn about when procedure are called without an explicit 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.
 
-
-@cindex -Wnonstd-intrinsic option
-@cindex options, -Wnonstd-intrinsic
-@item -Wnonstd-intrinsic
+@item -Wnonstd-intrinsics
+@opindex @code{Wnonstd-intrinsics}
+@cindex warnings, non-standard intrinsics
 Warn if the user tries to use an intrinsic that does not belong to the 
-standard the user has chosen via the -std option.
+standard the user has chosen via the @option{-std} option.
 
-
-@cindex -Wsurprising
-@cindex options, -Wsurprising
 @item -Wsurprising
-@cindex Suspicious
+@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.
 
@@ -376,61 +495,100 @@ 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.
 @end itemize
 
-@cindex -Wunderflow
-@cindex options, -Wunderflow
+@item -Wtabs
+@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.  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 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 -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, but about unused @code{PARAMETER} values.
+@option{-Wunused-parameter} is not included in @option{-Wall} but is
+implied by @option{-Wall -Wextra}.
 
-@cindex -Wunused-labels option
-@cindex options, -Wunused-labels
-@item -Wunused-labels
-@cindex unused labels
-@cindex labels, unused
-Warn whenever a label is defined but never referenced.
-
-
-@cindex -Werror
-@cindex options, -Werror
 @item -Werror
+@opindex @code{Werror}
+@cindex warnings, to errors
 Turns all warnings into errors.
-
-
-@cindex -W option
-@cindex options, -W
-@item -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 @command{gfortran}
 @end table
 
-@xref{Warning Options,,Options to Request or Suppress 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.
+@xref{Error and 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.
 
 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
 
 GNU Fortran has various special options that are used for debugging
-either your program or @command{gfortran}
+either your program or the GNU Fortran compiler.
 
 @table @gcctabopt
-@cindex -fdump-parse-tree option
-@cindex option, -fdump-parse-tree
 @item -fdump-parse-tree
+@opindex @code{fdump-parse-tree}
 Output the internal parse tree before starting code generation.  Only
-really useful for debugging gfortran itself.
+really useful for debugging the GNU Fortran compiler itself.
+
+@item -ffpe-trap=@var{list}
+@opindex @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).
+
+Some of the routines in the Fortran runtime library, like
+@samp{CPU_TIME}, are likely to to trigger floating point exceptions when
+@code{ffpe-trap=precision} is used. For this reason, the use of 
+@code{ffpe-trap=precision} is not recommended.
+
+@item -fbacktrace
+@opindex @code{fbacktrace}
+@cindex backtrace
+@cindex trace
+Specify that, when a runtime error is encountered or a deadly signal is
+emitted (segmentation fault, illegal instruction, bus error or
+floating-point exception), the Fortran runtime
+library should output a backtrace of the error.  This option
+only has influence for compilation of the Fortran main program.
+
+@item -fdump-core
+@cindex core, dump
+@opindex @code{fdump-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.
 @end table
 
 @xref{Debugging Options,,Options for Debugging Your Program or GCC,
@@ -438,24 +596,22 @@ 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
-There options affect how affect how @command{gfortran} searches
-for files specified via the @code{INCLUDE} directive, and where it searches
+These options affect how GNU Fortran searches
+for files specified by the @code{INCLUDE} directive and where it searches
 for previously compiled modules.
 
 It also affects the search paths used by @command{cpp} when used to preprocess
 Fortran source.
 
 @table @gcctabopt
-@cindex -Idir option
-@cindex options, -Idir
 @item -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
@@ -470,18 +626,20 @@ Also note that the general behavior of @option{-I} and
 @code{#include} in the @command{cpp} preprocessor, with regard to
 looking for @file{header.gcc} files and other such things.
 
-This path is also used to search for @samp{.mod} files when previously
+This path is also used to search for @file{.mod} files when previously
 compiled modules are required by a @code{USE} statement.
 
 @xref{Directory Options,,Options for Directory Search,
 gcc,Using the GNU Compiler Collection (GCC)}, for information on the
 @option{-I} option.
 
-@cindex -Mdir option
-@cindex option, -Mdir
 @item -M@var{dir}
 @item -J@var{dir}
-This option specifies where to put @samp{.mod} files for compiled modules.
+@opindex @code{M}@var{dir}
+@opindex @code{J}@var{dir}
+@cindex paths, search
+@cindex module search path
+This option specifies where to put @file{.mod} files for compiled modules.
 It is also added to the list of directories to searched by an @code{USE}
 statement.
 
@@ -489,13 +647,79 @@ 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}
+@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 options, runtime
+
+These options affect the runtime behavior of programs compiled with GNU Fortran.
+@table @gcctabopt
+@item -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
+representation for unformatted files; @samp{little-endian}, use little-endian
+representation for unformatted files.
+
+@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}.}
+
+@item -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 @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 @command{gfortran}, use @option{-frecord-marker=8}.
+
+@item -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 writing zero values, show the negative sign if the sign bit is set.
+@code{fno-sign-zero} does not print the negative sign of zero values for
+compatibility with F77.  Default behavior is to show the negative sign.
 @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.
@@ -506,11 +730,55 @@ one of the forms is listed---the one which is not the default.  You
 can figure out the other form by either removing @option{no-} or adding
 it.
 
-
 @table @gcctabopt
-@cindex -fno-underscoring option
-@cindex options, -fno-underscoring
+@item -fno-automatic
+@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
+@opindex ff2c
+@cindex calling convention
+@cindex @command{f2c} calling convention
+@cindex @command{g77} calling convention
+@cindex libf2c calling convention
+Generate code designed to be compatible with code generated
+by @command{g77} and @command{f2c}.
+
+The calling conventions used by @command{g77} (originally implemented
+in @command{f2c}) require functions that return type
+default @code{REAL} to actually return the C type @code{double}, and
+functions that return type @code{COMPLEX} to return the values via an
+extra argument in the calling sequence that points to where to
+store the return value.  Under the default GNU calling conventions, such
+functions simply return their results as they would in GNU
+C---default @code{REAL} functions return the C type @code{float}, and
+@code{COMPLEX} functions return the GNU C type @code{complex}.
+Additionally, this option implies the @option{-fsecond-underscore}
+option, unless @option{-fno-second-underscore} is explicitly requested.
+
+This does not affect the generation of code that interfaces with
+the @command{libgfortran} library.
+
+@emph{Caution:} It is not a good idea to mix Fortran code compiled with
+@option{-ff2c} with code compiled with the default @option{-fno-f2c}
+calling conventions as, calling @code{COMPLEX} or default @code{REAL}
+functions between program parts which were compiled with different
+calling conventions will break at execution time.
+
+@emph{Caution:} This will break code which passes intrinsic functions
+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
+@opindex @code{fno-underscoring}
 @cindex underscore
 @cindex symbol names, underscores
 @cindex transforming symbol names
@@ -518,34 +786,30 @@ it.
 Do not transform names of entities specified in the Fortran
 source file by appending underscores to them.
 
-With @option{-funderscoring} in effect, @command{gfortran} appends two
-underscores to names with underscores and one underscore to external names
-with no underscores.  (@command{gfortran} also appends two underscores to
-internal names with underscores to avoid naming collisions with external
-names.  The @option{-fno-second-underscore} option disables appending of the
-second underscore in all cases.)
+With @option{-funderscoring} in effect, GNU Fortran appends one
+underscore to external names with no underscores.  This is done to ensure
+compatibility with code produced by many UNIX Fortran compilers.
 
-This is done to ensure compatibility with code produced by many
-UNIX Fortran compilers, including @command{f2c} which perform the
-same transformations.
+@emph{Caution}: The default behavior of GNU Fortran is
+incompatible with @command{f2c} and @command{g77}, please use the
+@option{-ff2c} option if you want object files compiled with
+GNU Fortran to be compatible with object code created with these
+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).
+experimenting with issues such as integration of GNU Fortran into
+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 @samp{j()} and @samp{max_count()} are
-external functions while @samp{my_var} and @samp{lvar} are local variables,
+@option{-fcase-lower} and that @code{j()} and @code{max_count()} are
+external functions while @code{my_var} and @code{lvar} are local variables,
 a statement like
-
 @smallexample
 I = J() + MAX_COUNT (MY_VAR, LVAR)
 @end smallexample
-
 @noindent
 is implemented as something akin to:
-
 @smallexample
 i = j_() + max_count__(&my_var__, &lvar);
 @end smallexample
@@ -557,13 +821,13 @@ i = j() + max_count(&my_var, &lvar);
 @end smallexample
 
 Use of @option{-fno-underscoring} allows direct specification of
-user-defined names while debugging and when interfacing @command{gfortran}
+user-defined names while debugging and when interfacing GNU Fortran
 code with other languages.
 
 Note that just because the names match does @emph{not} mean that the
-interface implemented by @command{gfortran} for an external name matches the
+interface implemented by GNU Fortran for an external name matches the
 interface implemented by some other language for that same name.
-That is, getting code produced by @command{gfortran} to link to code produced
+That is, getting code produced by GNU Fortran to link to code produced
 by some other compiler using this or any other method can be only a
 small part of the overall solution---getting the code generated by
 both compilers to agree on issues other than naming can require
@@ -577,36 +841,42 @@ could make finding unresolved-reference bugs quite difficult in some
 cases---they might occur at program run time, and show up only as
 buggy behavior at run time.
 
-In future versions of @command{gfortran} we hope to improve naming and linking
+In future versions of GNU Fortran we hope to improve naming and linking
 issues so that debugging always involves using the names as they appear
 in the source, even if the names as seen by the linker are mangled to
 prevent accidental linking between procedures with incompatible
 interfaces.
 
-@cindex -fno-second-underscore option
-@cindex options, -fno-second-underscore
-@item -fno-second-underscore
+@item -fsecond-underscore
+@opindex @code{fsecond-underscore}
 @cindex underscore
 @cindex symbol names, underscores
 @cindex transforming symbol names
 @cindex symbol names, transforming
-Do not append a second underscore to names of entities specified
-in the Fortran source file.
+@cindex @command{f2c} calling convention
+@cindex @command{g77} calling convention
+@cindex libf2c calling convention
+By default, GNU Fortran appends an underscore to external
+names.  If this option is used GNU Fortran appends two
+underscores to names with underscores and one underscore to external names
+with no underscores.  GNU Fortran also appends two underscores to
+internal names with underscores to avoid naming collisions with external
+names.
 
 This option has no effect if @option{-fno-underscoring} is
-in effect.
+in effect.  It is implied by the @option{-ff2c} option.
 
-Otherwise, with this option, an external name such as @samp{MAX_COUNT}
+Otherwise, with this option, an external name such as @code{MAX_COUNT}
 is implemented as a reference to the link-time external symbol
-@samp{max_count_}, instead of @samp{max_count__}.
+@code{max_count__}, instead of @code{max_count_}.  This is required
+for compatibility with @command{g77} and @command{f2c}, and is implied
+by use of the @option{-ff2c} option.
 
-
-@cindex -fbounds-check option
-@cindex -ffortran-bounds-check option
 @item -fbounds-check
+@opindex @code{fbounds-check}
+@cindex array, bounds checking
 @cindex bounds checking
 @cindex range checking
-@cindex array bounds checking
 @cindex subscript checking
 @cindex checking subscripts
 Enable generation of run-time checks for array subscripts
@@ -614,56 +884,122 @@ and against the declared minimum and maximum values.  It also
 checks array indices for assumed and deferred
 shape arrays against the actual allocated bounds.
 
-In the future this may also include other forms of checking, eg. checking
-substring references.
+Some checks require that @option{-fbounds-check} is set for
+the compilation of the main program.
 
+In the future this may also include other forms of checking, e.g., checking
+substring references.
 
-@cindex -fmax-stack-var-size option
 @item -fmax-stack-var-size=@var{n}
+@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.
-Future versions of @command{gfortran} may improve this behavior.
+Future versions of GNU Fortran may improve this behavior.
 
 The default value for @var{n} is 32768.
 
-@cindex -fpackderived
-@item -fpackderived
-@cindex Structure packing
-This option tells gfortran to pack derived type members as closely as
+@item -fpack-derived
+@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.
 
-@cindex -frepack-arrays option
 @item -frepack-arrays
-@cindex Repacking arrays
-In some circumstances @command{gfortran} may pass assumed shape array
-sections via a descriptor describing a discontiguous area of memory.
+@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
 a contiguous block at runtime.
 
 This should result in faster accesses to the array.  However it can introduce
 significant overhead to the function call, especially  when the passed data
-is discontiguous.
+is noncontiguous.
+
+@item -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
+@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}
+@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
+handled by @command{gfortran} internal algorithms. If the matrices
+involved are not square, the size comparison is performed using the
+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
+@item -finit-integer=@var{n}
+@item -finit-real=@var{<zero|inf|-inf|nan>} 
+@item -finit-logical=@var{<true|false>}
+@item -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>}} (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 components of derived
+type variables, nor do they initialize variables that appear in an
+@code{EQUIVALENCE} statement.  (This limitation 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.
 @end table
 
 @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
-shared by @command{gfortran} @command{gcc} and other GNU compilers.
+shared by @command{gfortran}, @command{gcc}, and other GNU compilers.
 
 
 @c man end
 
 @node Environment Variables
-@section Environment Variables Affecting GNU Fortran
-@cindex environment variables
+@section Environment variables affecting @command{gfortran}
+@cindex environment variable
 
 @c man begin ENVIRONMENT
 
-GNU Fortran 95 currently does not make use of any environment
+The @command{gfortran} compiler currently does not make use of any environment
 variables to control its operation above and beyond those
 that affect the operation of @command{gcc}.
 
@@ -671,4 +1007,6 @@ that affect the operation of @command{gcc}.
 gcc,Using the GNU Compiler Collection (GCC)}, for information on environment
 variables.
 
+@xref{Runtime}, for environment variables that affect the
+run-time behavior of programs compiled with GNU Fortran.
 @c man end