[flang-commits] [clang] [flang] [flang] Add -finit-local= to initialize automatic variables (PR #216164)
Daniel Chen via flang-commits
flang-commits at lists.llvm.org
Fri Aug 14 07:01:21 PDT 2026
================
@@ -57,6 +57,11 @@ page](https://llvm.org/releases/).
- Added `-gz` and `-gz=<format>` flags to enable compression of DWARF debug
sections. Supported formats are `zlib`, `zstd`, and `none`.
+- Added `-finit-local=<val>` to initialize automatic (local, stack-allocated)
----------------
DanielCChen wrote:
Good question!
"local" means variables that have the scope of a subprogram.
"stack-allocated" is supposed to mean the consequence of how those "local" variables get their storage.
However, I just realized that there are options to allow users to put large "local" variables on the heap rather than the stack. The implementation of this PR will handle the initialization of such variables as well. So "stack-allocated" is not accurate here. I will remove them.
https://github.com/llvm/llvm-project/pull/216164
More information about the flang-commits
mailing list