[flang-commits] [flang] 44e8ee7 - [flang][doc] refine zero initialization extension documentation (#121956)
via flang-commits
flang-commits at lists.llvm.org
Wed Jan 8 01:56:07 PST 2025
Author: jeanPerier
Date: 2025-01-08T10:56:03+01:00
New Revision: 44e8ee73591bad22ae19748be825c4b66d7b3dde
URL: https://github.com/llvm/llvm-project/commit/44e8ee73591bad22ae19748be825c4b66d7b3dde
DIFF: https://github.com/llvm/llvm-project/commit/44e8ee73591bad22ae19748be825c4b66d7b3dde.diff
LOG: [flang][doc] refine zero initialization extension documentation (#121956)
Following-up on [comments
](https://github.com/llvm/llvm-project/issues/62432#issuecomment-2555316522)
in the issue that motivated this extension.
Added:
Modified:
flang/docs/Extensions.md
Removed:
################################################################################
diff --git a/flang/docs/Extensions.md b/flang/docs/Extensions.md
index 2d1c967a6068de..907f01204a3871 100644
--- a/flang/docs/Extensions.md
+++ b/flang/docs/Extensions.md
@@ -160,7 +160,11 @@ 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 scalar variables from the main program that are not explicitly
+ initialized or marked with an explicit SAVE attribute (these variables may be
+ placed on the stack by flang and not zero initialized). It is not advised to
+ rely on this extension in new code.
* In a saved entity of a type with a default initializer, components without default
values are zero initialized.
* Kind specification with `*`, e.g. `REAL*4`
More information about the flang-commits
mailing list