[flang-commits] [clang] [flang] [flang] Add support for -finit-local-zero (PR #159788)

via flang-commits flang-commits at lists.llvm.org
Mon Aug 3 02:31:21 PDT 2026


================
@@ -1225,6 +1226,69 @@ getSafeRepackAttrs(Fortran::lower::AbstractConverter &converter) {
   return attrs.empty() ? mlir::ArrayAttr{} : builder.getArrayAttr(attrs);
 }
 
+// Helper function to related to emission of implicit
+// assignments. `Implicit` here implies the assignment does not
+// exist in the Fortran source, but is implicit through definition
+// of one or more flagsets (like -finit-* family of flags).
+// General purpose usage of this function outside the
+// scope detailed here is discouraged, and is probably wrong.
+static void emitImplicitAssignment(Fortran::lower::AbstractConverter &converter,
+                                   mlir::Location loc,
+                                   const Fortran::semantics::Symbol &sym,
+                                   Fortran::lower::SymMap &symMap) {
+  if (converter.getLoweringOptions().getInitLocalZeroDef()) {
----------------
NimishMishra wrote:

Done.

https://github.com/llvm/llvm-project/pull/159788


More information about the flang-commits mailing list