[flang-commits] [flang] [flang] Cray pointer in module (PR #66119)

via flang-commits flang-commits at lists.llvm.org
Tue Sep 12 11:17:53 PDT 2023


================
@@ -759,6 +759,15 @@ void ModFileWriter::PutObjectEntity(
     PutLower(os << "attributes(", common::EnumToString(*attr))
         << ") " << symbol.name() << '\n';
   }
+  if (symbol.test(Fortran::semantics::Symbol::Flag::CrayPointer)) {
+    if (!symbol.owner().crayPointers().empty()) {
+      for (const auto &[pointee, pointer] : symbol.owner().crayPointers()) {
+        if (pointer == symbol) {
+          os << "pointer(" << symbol.name() << "," << pointee << ")\n";
+        }
+      }
+    }
+  }
----------------
kkwli wrote:

Thanks for the review. Sure, I will do that.

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


More information about the flang-commits mailing list