diff options
author | Peter Klausler <35819229+klausler@users.noreply.github.com> | 2024-01-15 12:52:18 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-15 12:52:18 -0800 |
commit | 4fcefbd3a41d77b2471c78c5b2e50d058ee46b97 (patch) | |
tree | c3b5be4f66d84881db1864c3a92535d0930a8788 | |
parent | 6e0a2031f09819425480df8d44122530275b2347 (diff) | |
download | llvm-4fcefbd3a41d77b2471c78c5b2e50d058ee46b97.zip llvm-4fcefbd3a41d77b2471c78c5b2e50d058ee46b97.tar.gz llvm-4fcefbd3a41d77b2471c78c5b2e50d058ee46b97.tar.bz2 |
[flang][runtime] Emit leading space before zero-length list-directed … (#77835)
…character
Don't omit the leading space in list-directed output before a line
comprising only a zero-length character value.
Fixes https://github.com/llvm/llvm-project/issues/77736.
-rw-r--r-- | flang/runtime/io-stmt.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/flang/runtime/io-stmt.cpp b/flang/runtime/io-stmt.cpp index 7052a6ac..3ec01ff 100644 --- a/flang/runtime/io-stmt.cpp +++ b/flang/runtime/io-stmt.cpp @@ -698,9 +698,6 @@ void FormattedIoStatementState<Direction::Input>::GotChar(int n) { bool ListDirectedStatementState<Direction::Output>::EmitLeadingSpaceOrAdvance( IoStatementState &io, std::size_t length, bool isCharacter) { - if (length == 0) { - return true; - } const ConnectionState &connection{io.GetConnectionState()}; int space{connection.positionInRecord == 0 || !(isCharacter && lastWasUndelimitedCharacter())}; |