This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[Patch, Fortran] invoke.texi: Be more verbose for -fno-automatic and -fmax-stack-var-size=<n>
- From: Tobias Burnus <burnus at net-b dot de>
- To: "'fortran at gcc dot gnu dot org'" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 16 Aug 2007 11:53:13 +0200
- Subject: [Patch, Fortran] invoke.texi: Be more verbose for -fno-automatic and -fmax-stack-var-size=<n>
:ADDPATCH fortran:
While looking at Asher's patch, I looked at gfortran's manpage:
* We never tell what "-fautomatic" does
* We don't reassure the user that -fno-automatic does not affect
procedures marked as RECURSIVE
* We don't point to -fmax-stack-var-size=
And for -fmax-stack-var-size=<n>:
* We don't tell what happens with variables which exceed the
max-stack-var-size
* We don't tell about -fmax-stack-var-size=-1
I therefore would suggest to apply the following patch;
I tested it by creating the info/man and the pdf file.
OK for the trunk?
Tobias
2007-08-16 Tobias Burnus <burnus@net-b.de>
* invoke.texi (-fno-automatic,-fmax-stack-var-size):
Be more verbose in the description.
Index: gcc/fortran/invoke.texi
===================================================================
--- gcc/fortran/invoke.texi (Revision 127532)
+++ gcc/fortran/invoke.texi (Arbeitskopie)
@@ -710,10 +710,12 @@
@opindex @code{fno-automatic}
@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}.)
+Treat each program unit (except those marked as RECURSIVE) 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} or @option{-save}.)
+The default is @option{-fautomatic} which uses the stack for local
+variables smaller than the value given by @option{-fmax-stack-var-size}.
@item -ff2c
@opindex ff2c
@@ -865,7 +867,8 @@
@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). If @var{n}=-1 the stack is always used.
This option currently only affects local arrays declared with constant
bounds, and may not apply to all character variables.