-@c Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010
+@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, 2008, 2009, 2010
+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
@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
@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 -fno-range-check -fbackslash -fmodule-private}
+@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{-cpp -dD -dI -dM -dN -dU -fworking-directory @gol
--imultilib @var{dir} -iprefix @var{file} -isysroot @var{dir} @gol
--iquote -isystem @var{dir} -nocpp -nostdinc -undef @gol
--A@var{question}=@var{answer} -A-@var{question}@r{[}=@var{answer}@r{]} @gol
--C -CC -D@var{macro}@r{[}=@var{defn}@r{]} -U@var{macro} -H -P}
+@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
--Wall -Waliasing -Wampersand -Warray-bounds -Wcharacter-truncation @gol
--Wconversion -Wimplicit-interface -Wimplicit-procedure -Wline-truncation @gol
--Wintrinsics-std -Wsurprising -Wno-tabs -Wunderflow -Wunused-parameter @gol
--Wintrinsics-shadow -Wno-align-commons}
+@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 GNU Fortran}.
-@gccoptlist{-fdump-parse-tree -ffpe-trap=@var{list} @gol
--fdump-core -fbacktrace}
+@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}.
@item Runtime Options
@xref{Runtime Options,,Options for influencing runtime behavior}.
-@gccoptlist{-fconvert=@var{conversion} -fno-range-check
--frecord-marker=@var{length} @gol -fmax-subrecord-length=@var{length}
--fsign-zero}
+@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 @gol
--fwhole-file -fsecond-underscore @gol
--fbounds-check -fcheck-array-temporaries -fmax-array-constructor =@var{n} @gol
+@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>} -fmax-stack-var-size=@var{n} @gol
--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|snan>} @gol
--finit-logical=@var{<true|false>} -finit-character=@var{n} @gol
--fno-align-commons -fno-protect-parens}
+-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.
-* 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.
-@end menu
-
@node Fortran Dialect Options
@section Options controlling Fortran dialect
@cindex dialect options
@table @gcctabopt
@item -ffree-form
-@item -ffixed-form
+@itemx -ffixed-form
@opindex @code{ffree-form}
@opindex @code{fno-fixed-form}
@cindex options, fortran dialect
intrinsic will be called except when it is explicitly declared @code{EXTERNAL}.
@item -fd-lines-as-code
-@item -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}
@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
@opindex @code{fcray-pointer}
Enable the Cray pointer extension, which provides C-like pointer
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}
@opindex @code{std=}@var{std} option
Specify the standard to which the program is expected to conform, which
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.
+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
@table @gcctabopt
@item -cpp
-@item -nocpp
+@itemx -nocpp
@opindex @code{cpp}
@opindex @code{fpp}
@cindex preprocessor, enable
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, be aware that any
-restrictions of the file-format, e.g. fixed-form line width,
-apply for preprocessed output as well.
+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}
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 -dM foo.f90
+ touch foo.f90; gfortran -cpp -E -dM foo.f90
@end smallexample
will show all the predefined macros.
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's present in the preprocessed input, as the directory emitted
+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
@item -A@var{predicate}=@var{answer}
@opindex @code{A@var{predicate}=@var{answer}}
-@cindex preprocessing, assertation
+@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, assertation
+@cindex preprocessing, assertion
Cancel an assertion with the predicate @var{predicate} and answer @var{answer}.
@item -C
@item -fsyntax-only
@opindex @code{fsyntax-only}
@cindex syntax checking
-Check the code for syntax errors, but don't actually compile it. This
+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.
This currently includes @option{-Waliasing}, @option{-Wampersand},
@option{-Wconversion}, @option{-Wsurprising}, @option{-Wintrinsics-std},
@option{-Wno-tabs}, @option{-Wintrinsic-shadow}, @option{-Wline-truncation},
-and @option{-Wunused}.
+@option{-Wreal-q-constant} and @option{-Wunused}.
@item -Waliasing
@opindex @code{Waliasing}
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
@opindex @code{Wsurprising}
@cindex warnings, suspicious code
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
@opindex @code{Werror}
@cindex warnings, to errors
Turns all warnings into errors.
@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.
either your program or the GNU Fortran compiler.
@table @gcctabopt
-@item -fdump-parse-tree
+@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 before starting code generation. Only
-really useful for debugging the GNU Fortran compiler itself.
+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}
@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 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}
+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 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.
+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
@xref{Debugging Options,,Options for Debugging Your Program or GCC,
@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}
@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. @code{fno-sign-zero} does not
-print the negative sign of zero values and regards zero as positive
-number in the @code{SIGN} intrinsic for compatibility with F77.
-Default behavior is to show the negative sign.
+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
prevent accidental linking between procedures with incompatible
interfaces.
-@item -fwhole-file
-@opindex @code{fwhole-file}
-By default, GNU Fortran parses, resolves and translates each procedure
-in a file separately. Using this option modifies this such that 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
+@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
+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
@opindex @code{fsecond-underscore}
@cindex underscore
@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
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
@opindex @code{fpack-derived}
@cindex structure packing
@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|snan>}
-@item -finit-logical=@var{<true|false>}
-@item -finit-character=@var{n}
+@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}
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).
+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
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
@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 largests to smallest.
+objects from largest to smallest.
@item -fno-protect-parens
@opindex @code{fno-protect-parens}
-@cindex re-association of parenthesed expressions
+@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.
+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,
offered by the GBE
shared by @command{gfortran}, @command{gcc}, and other GNU compilers.
-
@c man end
@node Environment Variables