[PATCH] D115190: [flang] Fix INQUIRE(FILE=,NAME=)

Peter Klausler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 7 08:17:31 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG398dffd4ffc7: [flang] Fix INQUIRE(FILE=,NAME=) (authored by klausler).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115190

Files:
  flang/runtime/io-stmt.cpp


Index: flang/runtime/io-stmt.cpp
===================================================================
--- flang/runtime/io-stmt.cpp
+++ flang/runtime/io-stmt.cpp
@@ -1202,7 +1202,10 @@
     break;
   case HashInquiryKeyword("NAME"):
     str = path_.get();
-    return true;
+    if (!str) {
+      return true; // result is undefined
+    }
+    break;
   }
   if (str) {
     ToFortranDefaultCharacter(result, length, str);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115190.392417.patch
Type: text/x-patch
Size: 425 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211207/c4df7285/attachment.bin>


More information about the llvm-commits mailing list