[flang-commits] [PATCH] D152295: [flang] Set "undefined" NEXTREC=n variable to 0 rather than random garbage
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Tue Jun 6 11:58:28 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe468f07550c5: [flang] Set "undefined" NEXTREC=n variable to 0 rather than random garbage (authored by klausler).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152295/new/
https://reviews.llvm.org/D152295
Files:
flang/runtime/io-api.cpp
Index: flang/runtime/io-api.cpp
===================================================================
--- flang/runtime/io-api.cpp
+++ flang/runtime/io-api.cpp
@@ -1451,15 +1451,14 @@
bool IONAME(InquireInteger64)(
Cookie cookie, InquiryKeywordHash inquiry, std::int64_t &result, int kind) {
IoStatementState &io{*cookie};
- std::int64_t n;
+ std::int64_t n{0}; // safe "undefined" value
if (io.Inquire(inquiry, n)) {
if (SetInteger(result, kind, n)) {
return true;
}
io.GetIoErrorHandler().SignalError(
"InquireInteger64(): bad INTEGER kind(%d) or out-of-range "
- "value(%jd) "
- "for result",
+ "value(%jd) for result",
kind, static_cast<std::intmax_t>(n));
}
return false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152295.528973.patch
Type: text/x-patch
Size: 756 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230606/21f06abf/attachment-0001.bin>
More information about the flang-commits
mailing list