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

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Mon Dec 6 14:40:54 PST 2021


klausler created this revision.
klausler added a reviewer: vdonaldson.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
klausler requested review of this revision.

The file name output was not being copied back to the program
from the runtime.


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.392190.patch
Type: text/x-patch
Size: 425 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20211206/36eb715e/attachment.bin>


More information about the flang-commits mailing list