[flang-commits] [PATCH] D132160: [flang][runtime] Don't raise internal error in user error recovery situation

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu Aug 18 14:51:19 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGfde42ac5b9d4: [flang][runtime] Don't raise internal error in user error recovery situation (authored by klausler).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132160/new/

https://reviews.llvm.org/D132160

Files:
  flang/runtime/io-stmt.h


Index: flang/runtime/io-stmt.h
===================================================================
--- flang/runtime/io-stmt.h
+++ flang/runtime/io-stmt.h
@@ -189,10 +189,10 @@
     if (get_if<FormattedIoStatementState<D>>()) {
       return true;
     } else {
-      if (!get_if<ErroneousIoStatementState>()) {
-        GetIoErrorHandler().Crash(
-            "%s called for I/O statement that is not formatted %s", name,
-            D == Direction::Output ? "output" : "input");
+      auto &handler{GetIoErrorHandler()};
+      if (!handler.InError()) {
+        handler.Crash("%s called for I/O statement that is not formatted %s",
+            name, D == Direction::Output ? "output" : "input");
       }
       return false;
     }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132160.453802.patch
Type: text/x-patch
Size: 740 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220818/e5518b14/attachment.bin>


More information about the flang-commits mailing list