[flang-commits] [flang] 88d4b85 - [flang] Allow user to recover from bad edit descriptor with INTEGER
Jean Perier via flang-commits
flang-commits at lists.llvm.org
Thu Mar 31 01:58:18 PDT 2022
Author: Jean Perier
Date: 2022-03-31T10:57:13+02:00
New Revision: 88d4b85f596450746a1f65a076732434df6df6f6
URL: https://github.com/llvm/llvm-project/commit/88d4b85f596450746a1f65a076732434df6df6f6
DIFF: https://github.com/llvm/llvm-project/commit/88d4b85f596450746a1f65a076732434df6df6f6.diff
LOG: [flang] Allow user to recover from bad edit descriptor with INTEGER
Runtime was crashing when an INTEGER passed in formatted output with
a bad edit descriptor even when the user did provide IOSTAT. Flang
is already signaling an error when facing similar error with other
types. Do the same with INTEGERs.
The input case is already signaling an error in the related input error
case.
Differential Revision: https://reviews.llvm.org/D122749
Added:
Modified:
flang/runtime/edit-output.cpp
Removed:
################################################################################
diff --git a/flang/runtime/edit-output.cpp b/flang/runtime/edit-output.cpp
index ebf2917acffb4..46d3752262587 100644
--- a/flang/runtime/edit-output.cpp
+++ b/flang/runtime/edit-output.cpp
@@ -57,7 +57,7 @@ bool EditIntegerOutput(IoStatementState &io, const DataEdit &edit,
return EditCharacterOutput(
io, edit, reinterpret_cast<char *>(&n), sizeof n);
default:
- io.GetIoErrorHandler().Crash(
+ io.GetIoErrorHandler().SignalError(IostatErrorInFormat,
"Data edit descriptor '%c' may not be used with an INTEGER data item",
edit.descriptor);
return false;
More information about the flang-commits
mailing list