[flang-commits] [PATCH] D124301: [flang][runtime] Signal record read overrun when PAD='NO'
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Fri Apr 22 14:29:27 PDT 2022
klausler created this revision.
klausler added a reviewer: vdonaldson.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
Herald added a project: All.
klausler requested review of this revision.
When PAD='NO' and ADVANCE='YES', we currently signal an input
error when a formatted read tries to go past the end of a record
only when a fixed RECL= is in effect. Other compilers will signal
an error without RECL= too, and that seems like a precedent we
should follow.
https://reviews.llvm.org/D124301
Files:
flang/runtime/io-stmt.cpp
Index: flang/runtime/io-stmt.cpp
===================================================================
--- flang/runtime/io-stmt.cpp
+++ flang/runtime/io-stmt.cpp
@@ -674,7 +674,7 @@
IoErrorHandler &handler{GetIoErrorHandler()};
if (mutableModes().nonAdvancing) {
handler.SignalEor();
- } else if (connection.openRecl && !connection.modes.pad) {
+ } else if (!connection.modes.pad) {
handler.SignalError(IostatRecordReadOverrun);
}
return connection.modes.pad; // PAD='YES'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124301.424612.patch
Type: text/x-patch
Size: 544 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220422/eca9bece/attachment.bin>
More information about the flang-commits
mailing list