Skip to content

Commit 5034e17

Browse files
committed
[flang] Remove runtime check from OpenFile::Close()
In error cases it is possible to CLOSE a unit that has not been successfully connected, so don't crash when the file descriptor is negative. Differential Revision: https://reviews.llvm.org/D115165
1 parent c84616c commit 5034e17

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

flang/runtime/file.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ void OpenFile::Predefine(int fd) {
157157
}
158158

159159
void OpenFile::Close(CloseStatus status, IoErrorHandler &handler) {
160-
CheckOpen(handler);
161160
pending_.reset();
162161
knownSize_.reset();
163162
switch (status) {

0 commit comments

Comments
 (0)