[PATCH] D83140: [flang] Define new runtime error IOSTAT values (I/O runtime work part 4)

Peter Klausler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 3 12:58:01 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGc7cabf9d608b: [flang] Define new runtime error IOSTAT values (I/O runtime work part 4) (authored by klausler).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83140

Files:
  flang/runtime/iostat.cpp
  flang/runtime/iostat.h


Index: flang/runtime/iostat.h
===================================================================
--- flang/runtime/iostat.h
+++ flang/runtime/iostat.h
@@ -45,6 +45,16 @@
   IostatInternalWriteOverrun,
   IostatErrorInFormat,
   IostatErrorInKeyword,
+  IostatEndfileNonSequential,
+  IostatEndfileUnwritable,
+  IostatOpenBadRecl,
+  IostatOpenUnknownSize,
+  IostatOpenBadAppend,
+  IostatWriteToReadOnly,
+  IostatReadFromWriteOnly,
+  IostatBackspaceNonSequential,
+  IostatBackspaceAtFirstRecord,
+  IostatRewindNonSequential,
 };
 
 const char *IostatErrorString(int);
Index: flang/runtime/iostat.cpp
===================================================================
--- flang/runtime/iostat.cpp
+++ flang/runtime/iostat.cpp
@@ -33,6 +33,26 @@
     return "Invalid FORMAT";
   case IostatErrorInKeyword:
     return "Bad keyword argument value";
+  case IostatEndfileNonSequential:
+    return "ENDFILE on non-sequential file";
+  case IostatEndfileUnwritable:
+    return "ENDFILE on read-only file";
+  case IostatOpenBadRecl:
+    return "OPEN with bad RECL= value";
+  case IostatOpenUnknownSize:
+    return "OPEN of file of unknown size";
+  case IostatOpenBadAppend:
+    return "OPEN(POSITION='APPEND') of unpositionable file";
+  case IostatWriteToReadOnly:
+    return "Attempted output to read-only file";
+  case IostatReadFromWriteOnly:
+    return "Attempted input from write-only file";
+  case IostatBackspaceNonSequential:
+    return "BACKSPACE on non-sequential file";
+  case IostatBackspaceAtFirstRecord:
+    return "BACKSPACE at first record";
+  case IostatRewindNonSequential:
+    return "REWIND on non-sequential file";
   default:
     return nullptr;
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83140.275452.patch
Type: text/x-patch
Size: 1693 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200703/3ee9c28d/attachment.bin>


More information about the llvm-commits mailing list