Skip to content

[flang][doc] refine zero initialization extension documentation #121956

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 8, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion flang/docs/Extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
Loading