[flang-commits] [PATCH] D108990: [flang] Set default form if unspecified at end of OPEN statement

Jean Perier via Phabricator via flang-commits flang-commits at lists.llvm.org
Tue Aug 31 23:41:11 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGc5729f2e638a: [flang] Set default form if unspecified at end of OPEN statement (authored by jeanPerier).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108990

Files:
  flang/runtime/io-stmt.cpp


Index: flang/runtime/io-stmt.cpp
===================================================================
--- flang/runtime/io-stmt.cpp
+++ flang/runtime/io-stmt.cpp
@@ -243,6 +243,10 @@
     }
     unit().isUnformatted = *isUnformatted_;
   }
+  if (!unit().isUnformatted) {
+    // Set default format (C.7.4 point 2).
+    unit().isUnformatted = unit().access != Access::Sequential;
+  }
   return ExternalIoStatementBase::EndIoStatement();
 }
 
@@ -969,7 +973,7 @@
                                               : "ASCII";
     break;
   case HashInquiryKeyword("FORM"):
-    str = !unit().isUnformatted ? "UNKNOWN"
+    str = !unit().isUnformatted ? "UNDEFINED"
         : *unit().isUnformatted ? "UNFORMATTED"
                                 : "FORMATTED";
     break;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108990.369865.patch
Type: text/x-patch
Size: 770 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20210901/7a4b4a96/attachment-0001.bin>


More information about the flang-commits mailing list