[flang][runtime] Don't do partial data transfer on short character read with ADVANCE...
authorPeter Klausler <pklausler@nvidia.com>
Tue, 11 Jul 2023 18:06:21 +0000 (11:06 -0700)
committerPeter Klausler <pklausler@nvidia.com>
Mon, 17 Jul 2023 17:04:15 +0000 (10:04 -0700)
commit7cf198f7988bf94306d9a6cd26228b81f7c7ca7f
tree630b4f4b896a5bdbd7ee12950bc9f8ebbee248a3
parent78be5aebaaf068e2a1496ff885eb1281c3fafb6a
[flang][runtime] Don't do partial data transfer on short character read with ADVANCE='NO', PAD='NO'

When a non-advancing formatted READ can't completely fill a CHARACTER
input item with data, and PAD='NO', don't modify the variable at all.
This matters when the error is recoverable.

Fixes https://github.com/llvm/llvm-project/issues/63772

Differential Revision: https://reviews.llvm.org/D155000
flang/runtime/edit-input.cpp
flang/runtime/io-stmt.cpp
flang/runtime/io-stmt.h
flang/unittests/Runtime/ExternalIOTest.cpp