forked from OSchip/llvm-project
996ef895cd
This legacy option (available in other Fortran compilers with various spellings) implies the SAVE attribute for local variables on subprograms that are not explicitly RECURSIVE. The SAVE attribute essentially implies static rather than stack storage. This was the default setting in Fortran until surprisingly recently, so explicit SAVE statements & attributes could be and often were omitted from older codes. Note that initialized objects already have an implied SAVE attribute, and objects in COMMON effectively do too, as data overlays are extinct; and since objects that are expected to survive from one invocation of a procedure to the next in static storage should probably be explicit initialized in the first place, so the use cases for this option are somewhat rare, and all of them could be handled with explicit SAVE statements or attributes. This implicit SAVE attribute must not apply to automatic (in the Fortran sense) local objects, whose sizes cannot be known at compilation time. To get the semantics of IsSaved() right, the IsAutomatic() predicate was moved into Evaluate/tools.cpp to allow for dynamic linking of the compiler. The redundant predicate IsAutomatic() was noticed, removed, and its uses replaced. GNU Fortran's spelling of the option (-fno-automatic) was added to the clang-based driver and used for basic sanity testing. Differential Revision: https://reviews.llvm.org/D114209 |
||
---|---|---|
.. | ||
Inputs | ||
code-gen.f90 | ||
cpp-nocpp-command-line-macro.f90 | ||
cpp-nocpp-predefined-macro.F90 | ||
debug-measure-parse-tree.f90 | ||
debug-parsing-log.f90 | ||
debug-provenance.f90 | ||
driver-error-cc1.c | ||
driver-error-cc1.cpp | ||
driver-help-hidden.f90 | ||
driver-help.f90 | ||
driver-version.f90 | ||
dump-all-bad.f90 | ||
dump-all.f90 | ||
dump-parse-tree-no-sema.f90 | ||
escaped-backslash.f90 | ||
fdefault.f90 | ||
fixed-free-detection.f90 | ||
fixed-free-flag.f90 | ||
fixed-line-length.f90 | ||
flarge-sizes.f90 | ||
frontend-forwarding.f90 | ||
get-definition.f90 | ||
implicit-none.f90 | ||
include-header.f90 | ||
init-only.f90 | ||
input-from-stdin.f90 | ||
intrinsic-module-path.f90 | ||
macro-def-undef.F90 | ||
macro-multiline.F90 | ||
missing-arg.f90 | ||
missing-input.f90 | ||
module-suffix.f90 | ||
output-paths.f90 | ||
parse-error.f95 | ||
phases.f90 | ||
plugin-invalid-name.f90 | ||
predefined-macros-compiler-version.F90 | ||
scanning-error.f95 | ||
std2018-wrong.f90 | ||
std2018.f90 | ||
syntax-only.f90 | ||
unparse-use-analyzed.f95 | ||
use-module-error.f90 | ||
use-module.f90 | ||
werror-parse.f | ||
werror-scan.f | ||
werror-sema.f90 | ||
werror-wrong.f90 | ||
write-module.f90 |