OSDN Git Service

2007-07-29 Daniel Franke <franke.daniel@gmail.com>
[pf3gnuchains/gcc-fork.git] / gcc / fortran / invoke.texi
index 5a12560..a7d2723 100644 (file)
@@ -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,
@@ -98,14 +97,15 @@ one is not the default.
 * 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,7 +114,7 @@ by type.  Explanations are in the following sections.
 
 @table @emph
 @item Fortran Language Options
-@xref{Fortran Dialect Options,,Options Controlling Fortran Dialect}.
+@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
@@ -124,30 +124,34 @@ by type.  Explanations are in the following sections.
 -fcray-pointer  -fopenmp  -frange-check -fno-backslash }
 
 @item Error and Warning Options
-@xref{Error and Warning Options,,Options to Request or Suppress Errors
-and Warnings}.
+@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
+-Wall  -Waliasing  -Wampersand  -Wcharacter-truncation  -Wconversion @gol
 -Wimplicit-interface  -Wline-truncation  -Wnonstd-intrinsics  -Wsurprising @gol
--Wno-tabs  -Wunderflow  -W}
+-Wno-tabs  -Wunderflow}
 
 @item Debugging Options
-@xref{Debugging Options,,Options for Debugging Your Program or GCC}.
+@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}.
+@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}}
 
 @item Code Generation Options
-@xref{Code Gen Options,,Options for Code Generation Conventions}.
+@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
@@ -161,13 +165,14 @@ and Warnings}.
 * 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
@@ -181,11 +186,8 @@ accepted by the compiler:
 @opindex @code{ffree-form}
 @opindex @code{fno-fixed-form}
 @cindex options, fortran dialect
-@cindex source file format
-@cindex free form
-@cindex fixed form
-@cindex Source Form
-@cindex Fortran 90, features
+@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
@@ -224,7 +226,7 @@ Do nothing if this is already the default.
 
 @item -fdollar-ok
 @opindex @code{fdollar-ok}
-@cindex dollar sign
+@cindex $
 @cindex symbol names
 @cindex character set
 Allow @samp{$} as a valid character in a symbol name.
@@ -238,12 +240,7 @@ Change the interpretation of backslashes in string literals from
 
 @item -ffixed-line-length-@var{n}
 @opindex @code{ffixed-line-length-}@var{n}
-@cindex source file format
-@cindex lines, length
-@cindex length of source lines
-@cindex limits, lengths of source lines
-@cindex card image
-@cindex extended-source option
+@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.
@@ -259,10 +256,7 @@ to them to fill out the line.
 
 @item -ffree-line-length-@var{n}
 @opindex @code{ffree-line-length-}@var{n}
-@cindex source file format
-@cindex lines, length
-@cindex length of source lines
-@cindex limits, lengths of source lines
+@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.
@@ -326,7 +320,7 @@ standards.
 @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
@@ -394,11 +388,6 @@ This should be used in conjunction with @option{-std=f95} or
 Like @option{-pedantic}, except that errors are produced rather than
 warnings.
 
-@item -w
-@opindex @code{w}
-@cindex warnings, none
-Inhibit all warning messages.
-
 @item -Wall
 @opindex @code{Wall}
 @cindex all warnings
@@ -434,7 +423,7 @@ The following example will trigger the warning.
 @item -Wampersand
 @opindex @code{Wampersand}
 @cindex warnings, ampersand
-@cindex ampersand
+@cindex &
 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
@@ -461,7 +450,7 @@ check that the declared interfaces are consistent across program units.
 
 @item -Wnonstd-intrinsics
 @opindex @code{Wnonstd-intrinsics}
-@cindex warnings, non-stdandard 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 @option{-std} option.
 
@@ -485,7 +474,7 @@ A LOGICAL SELECT construct has three CASE statements.
 @item -Wtabs
 @opindex @code{Wtabs}
 @cindex warnings, tabs
-@cindex 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
@@ -503,14 +492,6 @@ encountered, which yield an UNDERFLOW during compilation.
 @opindex @code{Werror}
 @cindex warnings, to errors
 Turns all warnings into errors.
-
-@item -W
-@opindex @code{W}
-@cindex warnings, extra
-@cindex extra warnings
-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
@@ -521,7 +502,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
 
@@ -556,8 +537,8 @@ 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
-@cindex @code{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.
@@ -568,7 +549,7 @@ 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
@@ -628,9 +609,28 @@ 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
@@ -650,10 +650,10 @@ variable override the default specified by @option{-fconvert}.}
 @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}
 @opindex @code{fmax-subrecord-length=}@var{length}
@@ -663,10 +663,10 @@ really useful for use by the gfortran testsuite.
 @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.
@@ -680,15 +680,15 @@ it.
 @table @gcctabopt
 @item -fno-automatic
 @opindex @code{fno-automatic}
-@cindex SAVE statement
-@cindex statements, SAVE
+@cindex @code{SAVE} statement
+@cindex statement, @code{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}.)
 
 @item -ff2c
-@opindex @code{ff2c}
+@opindex ff2c
 @cindex calling convention
 @cindex @command{f2c} calling convention
 @cindex @command{g77} calling convention
@@ -818,9 +818,9 @@ by use of the @option{-ff2c} 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
@@ -828,6 +828,9 @@ and against the declared minimum and maximum values.  It also
 checks array indices for assumed and deferred
 shape arrays against the actual allocated bounds.
 
+Some checks require that @option{-fbounds-check} is set for
+the compilation of the main probram.
+
 In the future this may also include other forms of checking, e.g., checking
 substring references.
 
@@ -870,8 +873,8 @@ enumerator set will fit in, and give all its enumerators this kind.
 
 @item -fexternal-blas
 @opindex @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
+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
@@ -899,8 +902,8 @@ 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