[clang] [flang] [clang][flang] Add support for -finit-local-zero (PR #159788)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 22 00:17:08 PDT 2025
================
@@ -5877,6 +6030,57 @@ class FirConverter : public Fortran::lower::AbstractConverter {
void instantiateVar(const Fortran::lower::pft::Variable &var,
Fortran::lower::AggregateStoreMap &storeMap) {
Fortran::lower::instantiateVariable(*this, var, localSymbols, storeMap);
+
+ /// Implicit assignment is defined by the `-finit-*` family of flags.
----------------
jeanPerier wrote:
Can you move the logic to where other cases of initializations is handled in [`instantiateLocal`](https://github.com/llvm/llvm-project/blob/655de70c485ef165b6e9576a50686aac629e2711/flang/lib/Lower/ConvertVariable.cpp#L1094).
That way, it is a lot clearer that this code is not overriding any initializations.
https://github.com/llvm/llvm-project/pull/159788
More information about the cfe-commits
mailing list