Skip to content

Commit

Permalink
[flang][runtime] Fix ENDFILE for formatted stream output
Browse files Browse the repository at this point in the history
A predicate expression made ENDFILE statements significant
only for sequential files, but it's applicable to formatted
stream output as well.

Differential Revision: https://reviews.llvm.org/D123730
  • Loading branch information
klausler committed Apr 16, 2022
1 parent e8760b5 commit 64aff36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flang/runtime/unit.cpp
Expand Up @@ -834,7 +834,7 @@ void ExternalFileUnit::DoImpliedEndfile(IoErrorHandler &handler) {
}

void ExternalFileUnit::DoEndfile(IoErrorHandler &handler) {
if (access == Access::Sequential) {
if (IsRecordFile()) {
endfileRecordNumber = currentRecordNumber;
}
FlushOutput(handler);
Expand Down

0 comments on commit 64aff36

Please sign in to comment.