[flang-commits] [PATCH] D135212: [flang][runtime] When NAMELIST input hits EOF, signal END, not an error
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Tue Oct 4 15:04:12 PDT 2022
klausler created this revision.
klausler added a reviewer: jeanPerier.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
Herald added a project: All.
klausler requested review of this revision.
NAMELIST input processing in the runtime support library treats an
end-of-file found while searching for the initial '&' character
as an error condition, but it really should be distinguishable.
Call SignalEnd() rather than SignalError().
https://reviews.llvm.org/D135212
Files:
flang/runtime/namelist.cpp
Index: flang/runtime/namelist.cpp
===================================================================
--- flang/runtime/namelist.cpp
+++ flang/runtime/namelist.cpp
@@ -383,7 +383,11 @@
next = io.GetNextNonBlank(byteCount);
}
}
- if (!next || *next != '&') {
+ if (!next) {
+ handler.SignalEnd();
+ return false;
+ }
+ if (*next != '&') {
handler.SignalError(
"NAMELIST input group does not begin with '&' (at '%lc')", *next);
return false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135212.465187.patch
Type: text/x-patch
Size: 508 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20221004/eb54c72b/attachment.bin>
More information about the flang-commits
mailing list