[flang-commits] [PATCH] D158653: [flang][runtime] INQUIRE(FILE=path, READ/READWRITE/WRITE=x) should be UNKNOWN when unknown
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Mon Aug 28 14:46:19 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7db0610c0620: [flang] INQUIRE(FILE=path, READ/READWRITE/WRITE=x) should be UNKNOWN when… (authored by klausler).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158653/new/
https://reviews.llvm.org/D158653
Files:
flang/runtime/io-stmt.cpp
Index: flang/runtime/io-stmt.cpp
===================================================================
--- flang/runtime/io-stmt.cpp
+++ flang/runtime/io-stmt.cpp
@@ -1347,13 +1347,16 @@
str = "UNKNONN";
break;
case HashInquiryKeyword("READ"):
- str = MayRead(path_.get()) ? "YES" : "NO";
+ str =
+ IsExtant(path_.get()) ? MayRead(path_.get()) ? "YES" : "NO" : "UNKNOWN";
break;
case HashInquiryKeyword("READWRITE"):
- str = MayReadAndWrite(path_.get()) ? "YES" : "NO";
+ str = IsExtant(path_.get()) ? MayReadAndWrite(path_.get()) ? "YES" : "NO"
+ : "UNKNOWN";
break;
case HashInquiryKeyword("WRITE"):
- str = MayWrite(path_.get()) ? "YES" : "NO";
+ str = IsExtant(path_.get()) ? MayWrite(path_.get()) ? "YES" : "NO"
+ : "UNKNOWN";
break;
case HashInquiryKeyword("NAME"):
str = path_.get();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158653.554057.patch
Type: text/x-patch
Size: 918 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230828/6be3e03a/attachment-0001.bin>
More information about the flang-commits
mailing list