This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]