Index: gcc/gcc/fortran/invoke.texi |
diff --git a/gcc/gcc/fortran/invoke.texi b/gcc/gcc/fortran/invoke.texi |
index 8e18dd2342cb05539adbe163ca637b219a3f4501..6d3681d69a110c730f216e5a8c35c7ccec68d40b 100644 |
--- a/gcc/gcc/fortran/invoke.texi |
+++ b/gcc/gcc/fortran/invoke.texi |
@@ -1,11 +1,11 @@ |
-@c Copyright (C) 2004, 2005, 2006, 2007, 2008 |
+@c Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 |
@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 |
+Copyright @copyright{} 2004, 2005, 2006, 2007, 2008, 2009 |
Free Software Foundation, Inc. |
Permission is granted to copy, distribute and/or modify this document |
@@ -137,9 +137,9 @@ 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 -Wline-truncation -Wintrinsics-std @gol |
--Wsurprising -Wno-tabs -Wunderflow -Wunused-parameter -Wintrinsics-shadow @gol |
--Wno-align-commons} |
+-Wconversion -Wimplicit-interface -Wimplicit-procedure -Wline-truncation @gol |
+-Wintrinsics-std -Wsurprising -Wno-tabs -Wunderflow -Wunused-parameter @gol |
+-Wintrinsics-shadow -Wno-align-commons} |
@item Debugging Options |
@xref{Debugging Options,,Options for debugging your program or GNU Fortran}. |
@@ -164,13 +164,15 @@ and warnings}. |
@item Code Generation Options |
@xref{Code Gen Options,,Options for code generation conventions}. |
@gccoptlist{-fno-automatic -ff2c -fno-underscoring @gol |
--fsecond-underscore @gol |
+-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>} |
-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>} @gol |
--finit-logical=@var{<true|false>} -finit-character=@var{n} -fno-align-commons} |
+-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} |
@end table |
@menu |
@@ -255,7 +257,10 @@ the default width of @code{DOUBLE PRECISION} to 16 bytes if possible, unless |
@cindex $ |
@cindex symbol names |
@cindex character set |
-Allow @samp{$} as a valid character in a symbol name. |
+Allow @samp{$} as a valid non-first character in a symbol name. Symbols |
+that start with @samp{$} are rejected since it is unclear which rules to |
+apply to implicit typing as different vendors implement different rules. |
+Using @samp{$} in @code{IMPLICIT} statements is also rejected. |
@item -fbackslash |
@opindex @code{backslash} |
@@ -750,6 +755,12 @@ Warn if a procedure is called without an explicit interface. |
Note this only checks that an explicit interface is present. It does not |
check that the declared interfaces are consistent across program units. |
+@item -Wimplicit-procedure |
+@opindex @code{Wimplicit-procedure} |
+@cindex warnings, implicit procedure |
+Warn if a procedure is called that has neither an explicit interface |
+nor has been declared as @code{EXTERNAL}. |
+ |
@item -Wintrinsics-std |
@opindex @code{Wintrinsics-std} |
@cindex warnings, non-standard intrinsics |
@@ -757,7 +768,7 @@ check that the declared interfaces are consistent across program units. |
Warn if @command{gfortran} finds a procedure named like an intrinsic not |
available in the currently selected standard (with @option{-std}) and treats |
it as @code{EXTERNAL} procedure because of this. @option{-fall-intrinsics} can |
-be used to never trigger this behaviour and always link to the intrinsic |
+be used to never trigger this behavior and always link to the intrinsic |
regardless of the selected standard. |
@item -Wsurprising |
@@ -782,6 +793,9 @@ A TRANSFER specifies a source that is shorter than the destination. |
@item |
The type of a function result is declared more than once with the same type. If |
@option{-pedantic} or standard-conforming mode is enabled, this is an error. |
+ |
+@item |
+A @code{CHARACTER} variable is declared with negative length. |
@end itemize |
@item -Wtabs |
@@ -1020,9 +1034,12 @@ 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. |
+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. |
@end table |
@node Code Gen Options |
@@ -1157,6 +1174,19 @@ in the source, even if the names as seen by the linker are mangled to |
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 |
+to external procedures that are in the same file effect resolution of |
+that procedure, if not already done, and a check of the interfaces. The |
+dependences are resolved by changing the order in which the file is |
+translated into the backend tree. Thus, a procedure that is referenced |
+is translated before the reference and the duplication of backend tree |
+declarations eliminated. |
+ |
@item -fsecond-underscore |
@opindex @code{fsecond-underscore} |
@cindex underscore |
@@ -1182,13 +1212,33 @@ is implemented as a reference to the link-time external symbol |
for compatibility with @command{g77} and @command{f2c}, and is implied |
by use of the @option{-ff2c} option. |
-@item -fbounds-check |
-@opindex @code{fbounds-check} |
+@item -fcheck=@var{<keyword>} |
+@opindex @code{fcheck} |
@cindex array, bounds checking |
@cindex bounds checking |
+@cindex pointer checking |
+@cindex memory checking |
@cindex range checking |
@cindex subscript checking |
@cindex checking subscripts |
+@cindex run-time checking |
+@cindex checking array temporaries |
+ |
+Enable the generation of run-time checks; the argument shall be |
+a comma-delimited list of the following keywords. |
+ |
+@table @asis |
+@item @samp{all} |
+Enable all run-time test of @option{-fcheck}. |
+ |
+@item @samp{array-temps} |
+Warns at run time when for passing an actual argument a temporary array |
+had to be generated. The information generated by this warning is |
+sometimes useful in optimization, in order to avoid such temporaries. |
+ |
+Note: The warning is only printed once per location. |
+ |
+@item @samp{bounds} |
Enable generation of run-time checks for array subscripts |
and against the declared minimum and maximum values. It also |
checks array indices for assumed and deferred |
@@ -1196,22 +1246,40 @@ shape arrays against the actual allocated bounds and ensures that all string |
lengths are equal for character array constructors without an explicit |
typespec. |
-Some checks require that @option{-fbounds-check} is set for |
+Some checks require that @option{-fcheck=bounds} is set for |
the compilation of the main program. |
Note: In the future this may also include other forms of checking, e.g., |
checking substring references. |
+@item @samp{do} |
+Enable generation of run-time checks for invalid modification of loop |
+iteration variables. |
-@item fcheck-array-temporaries |
-@opindex @code{fcheck-array-temporaries} |
-@cindex checking array temporaries |
-Warns at run time when for passing an actual argument a temporary array |
-had to be generated. The information generated by this warning is |
-sometimes useful in optimization, in order to avoid such temporaries. |
+@item @samp{mem} |
+Enable generation of run-time checks for memory allocation. |
+Note: This option does not affect explicit allocations using the |
+@code{ALLOCATE} statement, which will be always checked. |
-Note: The warning is only printed once per location. |
+@item @samp{pointer} |
+Enable generation of run-time checks for pointers and allocatables. |
+@item @samp{recursion} |
+Enable generation of run-time checks for recursively called subroutines and |
+functions which are not marked as recursive. See also @option{-frecursive}. |
+Note: This check does not work for OpenMP programs and is disabled if used |
+together with @option{-frecursive} and @option{-fopenmp}. |
+@end table |
+ |
+ |
+@item -fbounds-check |
+@opindex @code{fbounds-check} |
+@c Note: This option is also referred in gcc's manpage |
+Deprecated alias for @option{-fcheck=bounds}. |
+ |
+@item -fcheck-array-temporaries |
+@opindex @code{fcheck-array-temporaries} |
+Deprecated alias for @option{-fcheck=array-temps}. |
@item -fmax-array-constructor=@var{n} |
@opindex @code{fmax-array-constructor} |
@@ -1303,7 +1371,7 @@ on the stack. This flag cannot be used together with |
@item -finit-local-zero |
@item -finit-integer=@var{n} |
-@item -finit-real=@var{<zero|inf|-inf|nan>} |
+@item -finit-real=@var{<zero|inf|-inf|nan|snan>} |
@item -finit-logical=@var{<true|false>} |
@item -finit-character=@var{n} |
@opindex @code{finit-local-zero} |
@@ -1317,7 +1385,7 @@ 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 |
+@option{-finit-real=@var{<zero|inf|-inf|nan|snan>}} (which also initializes |
the real and imaginary parts of local @code{COMPLEX} variables), |
@option{-finit-logical=@var{<true|false>}}, and |
@option{-finit-character=@var{n}} (where @var{n} is an ASCII character |
@@ -1327,7 +1395,10 @@ type variables, nor do they initialize variables that appear in an |
future releases). |
Note that the @option{-finit-real=nan} option initializes @code{REAL} |
-and @code{COMPLEX} variables with a quiet NaN. |
+and @code{COMPLEX} variables with a quiet NaN. For a signalling NaN |
+use @option{-finit-real=snan}; note, however, that compile-time |
+optimizations may convert them into quiet NaN and that trapping |
+needs to be enabled (e.g. via @option{-ffpe-trap}). |
@item -falign-commons |
@opindex @code{falign-commons} |
@@ -1340,6 +1411,16 @@ consistent data types everywhere, this padding can cause trouble, and |
same form of this option should be used for all files that share a COMMON block. |
To avoid potential alignment issues in COMMON blocks, it is recommended to order |
objects from largests to smallest. |
+ |
+@item -fno-protect-parens |
+@opindex @code{fno-protect-parens} |
+@cindex re-association of parenthesed 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 REAL and |
+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. |
@end table |
@xref{Code Gen Options,,Options for Code Generation Conventions, |