Skip to content

Commit f8ae424

Browse files
klauslerjustinfargnoli
authored andcommitted
[flang][runtime] Emit leading space before zero-length list-directed … (llvm#77835)
…character Don't omit the leading space in list-directed output before a line comprising only a zero-length character value. Fixes llvm#77736.
1 parent b28689e commit f8ae424

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

flang/runtime/io-stmt.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -698,9 +698,6 @@ void FormattedIoStatementState<Direction::Input>::GotChar(int n) {
698698

699699
bool ListDirectedStatementState<Direction::Output>::EmitLeadingSpaceOrAdvance(
700700
IoStatementState &io, std::size_t length, bool isCharacter) {
701-
if (length == 0) {
702-
return true;
703-
}
704701
const ConnectionState &connection{io.GetConnectionState()};
705702
int space{connection.positionInRecord == 0 ||
706703
!(isCharacter && lastWasUndelimitedCharacter())};

0 commit comments

Comments
 (0)