Skip to content

Commit 6c33a53

Browse files
committed
[flang][doc] refine zero initialization extension
1 parent 17c8c1c commit 6c33a53

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

flang/docs/Extensions.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,10 @@ end
160160
* `<>` as synonym for `.NE.` and `/=`
161161
* `$` and `@` as legal characters in names
162162
* Initialization in type declaration statements using `/values/`
163-
* Saved variables without explicit or default initializers are zero initialized.
163+
* Saved variables without explicit or default initializers are zero initialized,
164+
except for implicitly saved scalar variables from the main program that are
165+
kept on the stack by flang and are not zero initialized. It is not advised to
166+
rely on this extension in new code.
164167
* In a saved entity of a type with a default initializer, components without default
165168
values are zero initialized.
166169
* Kind specification with `*`, e.g. `REAL*4`

0 commit comments

Comments
 (0)