[flang-commits] [flang] [flang][doc] refine zero initialization extension documentation (PR #121956)
Peter Klausler via flang-commits
flang-commits at lists.llvm.org
Tue Jan 7 08:00:55 PST 2025
================
@@ -160,7 +160,10 @@ end
* `<>` as synonym for `.NE.` and `/=`
* `$` and `@` as legal characters in names
* Initialization in type declaration statements using `/values/`
-* Saved variables without explicit or default initializers are zero initialized.
+* Saved variables without explicit or default initializers are zero initialized,
+ except for implicitly saved scalar variables from the main program that are
----------------
klausler wrote:
it might be more clear to the general reader to replace "implicitly saved scalar variables from the main program" with "scalar variables from the main program that are not explicitly initialized or marked with an explicit `SAVE` attribute".
I still think that somebody should add an option to the flang-new driver to cause main program variables to be static; the hooks are there in Fortran-features.h to do so.
https://github.com/llvm/llvm-project/pull/121956
More information about the flang-commits
mailing list