[flang-commits] [PATCH] D120745: [flang] Allow data transfer stmt control list errors to be caught

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Tue Mar 1 09:55:38 PST 2022


klausler created this revision.
klausler added a reviewer: vdonaldson.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
klausler requested review of this revision.

The runtime crashes on several fundamental I/O data transfer statement
control list errors, like list I/O on a direct-access unit, or
input from a write-only unit, &c.  These errors should not be fatal
when ERR= or IOSTAT= are present.

This patch creates a new ErroneousIoStatementState class and
uses it for the state of an I/O statement that is doomed to fail
from these errors.  If there is no ERR= label or IOSTAT= variable,
the error will be raised at the end of the statement.  Data transfer
operations along the way will be no-op failures.


https://reviews.llvm.org/D120745

Files:
  flang/include/flang/Runtime/iostat.h
  flang/runtime/io-api.cpp
  flang/runtime/io-stmt.cpp
  flang/runtime/io-stmt.h
  flang/runtime/iostat.cpp
  flang/runtime/unit.cpp
  flang/runtime/unit.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120745.412145.patch
Type: text/x-patch
Size: 16186 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220301/7934ea95/attachment.bin>


More information about the flang-commits mailing list