[flang-commits] [flang] [flang][runtime] Added pseudo file unit for simplified PRINT. (PR #86134)

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Thu Mar 21 08:56:12 PDT 2024


================
@@ -227,7 +227,18 @@ ConnectionState &ExternalIoStatementBase::GetConnectionState() { return unit_; }
 int ExternalIoStatementBase::EndIoStatement() {
   CompleteOperation();
   auto result{IoStatementBase::EndIoStatement()};
+#if defined(RT_USE_PSEUDO_FILE_UNIT)
+  // Fetch the unit pointer before *this disappears.
+  ExternalFileUnit *unitPtr{&unit_};
+#endif
   unit_.EndIoStatement(); // annihilates *this in unit_.u_
----------------
vzakhari wrote:

Thanks, I will change it.

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


More information about the flang-commits mailing list