An OPEN statement that implies closing a connection must invalidate
the unit's frame buffer so as to prevent stale data from the old
connection from being read into the newly-connected unit.
Differential Revision: https://reviews.llvm.org/D130430
// Otherwise, OPEN on open unit with new FILE= implies CLOSE
DoImpliedEndfile(handler);
FlushOutput(handler);
+ TruncateFrame(0, handler);
Close(CloseStatus::Keep, handler);
}
if (newPath.get() && newPathLength > 0) {