Lahey/GNU Fortran


SAVE Local Variables

Compile only. Default: -nsav

GFortran option: -fno-automatic

Specify -sav to save local variables in between subprogram invocations. -nsav causes local variables to be stored on the stack, and their value is not retained in between subprogram invocations. -sav is equivalent to having a SAVE statement in each subprogram except that -sav does not apply to local variables in a recursive function whereas the SAVE statement does. Specifying -sav will cause your executable to run more slowly, especially if you have many procedures. Specifying -nsav may sometimes require more stack space than provided by default.