[all-commits] [llvm/llvm-project] 8db4dc: [flang] Error recovery improvement in runtime (IOM...
Peter Klausler via All-commits
all-commits at lists.llvm.org
Fri Mar 18 17:28:27 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8db4dc86861211dfd72848cb9f35e78a1fe5c1d8
https://github.com/llvm/llvm-project/commit/8db4dc86861211dfd72848cb9f35e78a1fe5c1d8
Author: Peter Klausler <pklausler at nvidia.com>
Date: 2022-03-18 (Fri, 18 Mar 2022)
Changed paths:
M flang/runtime/descriptor-io.h
M flang/runtime/io-api.cpp
M flang/runtime/io-error.cpp
M flang/runtime/io-error.h
M flang/runtime/io-stmt.cpp
M flang/runtime/io-stmt.h
Log Message:
-----------
[flang] Error recovery improvement in runtime (IOMSG=)
Some refactoring and related fixes for more accurate
user program error recovery in the I/O runtime, especially
for error recovery with IOMSG= character values.
1) Move any work in an EndIoStatement() implementation
that may raise an error into a new CompleteOperation()
member function. This allows error handling APIs like
GetIoMsg() to complete a pending I/O statement and harvest
any errors that may result.
2) Move the pending error code from ErroneousIoStatementState
to a new pendingError_ data member in IoErrorHandler.
This allows IoErrorHandler::InError() to return a correct
result when there is a pending error that will be recovered
from so that I/O list data transfers don't crash in the meantime.
3) Don't create and leak a unit for a failed OPEN(NEWUNIT=n)
with error recovery, and don't modify 'n'. (Depends on
changes to API call ordering in lowering, in a separate patch;
code was added to ensure that OPEN statement control list
specifiers, e.g. SetFile(), must be passed before GetNewUnit().)
4) Fix the code that calls a form of strerror to fill an
IOMSG= variable so that it actually works for Fortran's
character type: blank fill with no null or newline termination.
Differential Revision: https://reviews.llvm.org/D122036
More information about the All-commits
mailing list