This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] |
This option should not apply to RECURSIVE functions. It's ok for non-recursive functions because it's just making undefined behaviour implementation defined. However for RECURSIVE functions it breaks legal programs.
+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}.)
This isn't entirely accurate. It's the equivalent of adding a single "save" statement with no saved-entity-list. This is different because it only applies to "all allowed items in the same scoping unit" (Section 5.2.4). In particular it does not apply to automatic (aka variable size) objects. eg.
subroutine foo(n) integer n integer, dimension(n) :: a save a = 0; end subroutine
"a" will not be given the SAVE attribute.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |