[all-commits] [llvm/llvm-project] df38f3: [flang] Allow data transfer stmt control list erro...

Peter Klausler via All-commits all-commits at lists.llvm.org
Tue Mar 1 14:39:50 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: df38f35acb56b63df23d8645e0f8d791cfe74c83
      https://github.com/llvm/llvm-project/commit/df38f35acb56b63df23d8645e0f8d791cfe74c83
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2022-03-01 (Tue, 01 Mar 2022)

  Changed paths:
    M flang/include/flang/Runtime/iostat.h
    M flang/runtime/io-api.cpp
    M flang/runtime/io-stmt.cpp
    M flang/runtime/io-stmt.h
    M flang/runtime/iostat.cpp
    M flang/runtime/unit.cpp
    M flang/runtime/unit.h

  Log Message:
  -----------
  [flang] Allow data transfer stmt control list errors to be caught

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.

Differential Revision: https://reviews.llvm.org/D120745




More information about the All-commits mailing list