[flang-commits] [flang] [flang] Fix variable unformatted I/O bug with output after input (PR #92828)

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Mon May 20 15:22:09 PDT 2024


================
@@ -214,6 +214,13 @@ Iostat ExternalFileUnit::SetDirection(Direction direction) {
     }
   } else {
     if (mayWrite()) {
+      if (direction_ == Direction::Input) {
+        // Don't retain any input data from previous record, like a
+        // variable-length unformatted record footer, in the frame,
+        // since we're going start writing frames.
----------------
vzakhari wrote:

```suggestion
        // since we're going to start writing frames.
```

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


More information about the flang-commits mailing list