[flang-commits] [flang] [flang][runtime] Added pseudo file unit for simplified PRINT. (PR #86134)
Peter Klausler via flang-commits
flang-commits at lists.llvm.org
Thu Mar 21 08:46:25 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_
----------------
klausler wrote:
The comment on this statement isn't relevant on the device. Maybe it would be more clear to have one `#ifdef / #else / #endif` construct.
https://github.com/llvm/llvm-project/pull/86134
More information about the flang-commits
mailing list