diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-11 11:13:27 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-05-11 11:13:27 +0000 |
commit | c41143fb1d63596ff2a0f6da741b4bae73b8be16 (patch) | |
tree | d70c0763693cfef7bc877f21e079986944261a5f /gcc/fortran/invoke.texi | |
parent | eb0badc13724022c8828a55e516d0eecdc487cc3 (diff) | |
download | gcc-c41143fb1d63596ff2a0f6da741b4bae73b8be16.tar.gz |
2011-05-11 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 173647 using svnmerge
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@173652 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/invoke.texi')
-rw-r--r-- | gcc/fortran/invoke.texi | 77 |
1 files changed, 65 insertions, 12 deletions
diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi index 22245c91b5c..9f022390b56 100644 --- a/gcc/fortran/invoke.texi +++ b/gcc/fortran/invoke.texi @@ -134,12 +134,13 @@ by type. Explanations are in the following sections. @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 --Wintrinsic-shadow -Wno-align-commons} +@gccoptlist{-fmax-errors=@var{n} +-fsyntax-only -pedantic -pedantic-errors -Wall @gol +-Waliasing -Wampersand -Warray-bounds -Wcharacter-truncation @gol +-Wconversion -Wimplicit-interface -Wimplicit-procedure -Wline-truncation @gol +-Wintrinsics-std -Wreal-q-constant -Wsurprising -Wno-tabs -Wunderflow @gol +-Wunused-parameter -Wintrinsic-shadow -Wno-align-commons @gol +-Wfunction-elimination} @item Debugging Options @xref{Debugging Options,,Options for debugging your program or GNU Fortran}. @@ -166,12 +167,14 @@ and warnings}. -fwhole-file -fsecond-underscore @gol -fbounds-check -fcheck-array-temporaries -fmax-array-constructor =@var{n} @gol -fcheck=@var{<all|array-temps|bounds|do|mem|pointer|recursion>} @gol --fcoarray=@var{<none|single>} -fmax-stack-var-size=@var{n} @gol +-fcoarray=@var{<none|single|lib>} -fmax-stack-var-size=@var{n} @gol +-fstack-arrays @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 -frealloc-lhs} +-fno-align-commons -fno-protect-parens -frealloc-lhs @gol +-faggressive-function-elimination -ffrontend-optimize} @end table @menu @@ -365,7 +368,9 @@ extensions, and may be useful for old non-standard programs. The 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=f2008tr} +allows the Fortran 2008 standard including the additions of the +technical report (TR) 29113. @end table @@ -692,7 +697,7 @@ we recommend avoiding and that we believe are easy to avoid. 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} @@ -780,6 +785,12 @@ 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 @opindex @code{Wsurprising} @cindex warnings, suspicious code @@ -859,6 +870,14 @@ 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 @opindex @code{Werror} @cindex warnings, to errors @@ -1249,6 +1268,10 @@ 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 @@ -1357,6 +1380,13 @@ 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's possible that you'll have to extend your runtime +limits for stack memory on some operating systems. + @item -fpack-derived @opindex @code{fpack-derived} @cindex structure packing @@ -1460,7 +1490,8 @@ 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} @@ -1468,6 +1499,29 @@ need to be in effect. 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, @@ -1475,7 +1529,6 @@ 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 |