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

via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 28 00:59:24 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,
----------------
jeanPerier wrote:

Prefer a name like "emitForcedInitialization" (I would rather have initialization in the name than assignment to better match the feature and flag name). Same for the predicate.

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


More information about the cfe-commits mailing list