From 88d4b85f596450746a1f65a076732434df6df6f6 Mon Sep 17 00:00:00 2001 From: Jean Perier Date: Thu, 31 Mar 2022 10:57:01 +0200 Subject: [PATCH] [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 --- flang/runtime/edit-output.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flang/runtime/edit-output.cpp b/flang/runtime/edit-output.cpp index ebf2917..46d3752 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(&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; -- 2.7.4