[clang] [flang] [flang][clang] Add support for -finit-logical in Flang (PR #150939)

Kiran Chandramohan via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 28 07:47:10 PDT 2025


================
@@ -5720,6 +5720,79 @@ 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.
+    /// These options do not initialize:
+    ///   1) Any variable already initialized
+    ///   2) objects with the POINTER attribute
+    ///   3) allocatable arrays
+    ///   4) variables that appear in an EQUIVALENCE statement
----------------
kiranchandramohan wrote:

Is this to match the implementation in gfortran?

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


More information about the cfe-commits mailing list