[flang-commits] [PATCH] D123734: [flang][runtime] Don't emit empty lines for bad writes

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Apr 15 20:32:55 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG1fe7a187ae99: [flang][runtime] Don't emit empty lines for bad writes (authored by klausler).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123734/new/

https://reviews.llvm.org/D123734

Files:
  flang/runtime/unit.cpp


Index: flang/runtime/unit.cpp
===================================================================
--- flang/runtime/unit.cpp
+++ flang/runtime/unit.cpp
@@ -527,6 +527,11 @@
       } else {
         // Unformatted stream: nothing to do
       }
+    } else if (handler.GetIoStat() != IostatOk &&
+        furthestPositionInRecord == 0) {
+      // Error in formatted variable length record, and no output yet; do
+      // nothing, like most other Fortran compilers do.
+      return true;
     } else {
       // Terminate formatted variable length record
       const char *lineEnding{"\n"};


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123734.423213.patch
Type: text/x-patch
Size: 593 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220416/48cc1fb4/attachment.bin>


More information about the flang-commits mailing list