https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89020
--- Comment #4 from Luke Robison <robison at arlut dot utexas.edu> --- > First, what virtualbox is doing is a violation of common UNIX > semantics, so we would be within our rights :-) to do this. Agreed. This is definitely outside of the norm for a unix filesystem. I just tried this program on windows native with mingw-64's gfortran, and the file is deleted as expected. I don't know enough about mingw-64 to know if they've rewritten that part of the library, or how they translate those system calls. > On the third hand, I seem to remember that unlink / close also > used to cause (potential?) issues with NFS. I haven't experienced this yet, although I've been using primarily lustre network mounts, not NFS. > Work around for virtualbox might be > call execute_command_line("rm -f " // filename) I'm using the (GNU Extension) unlink() function as my work-around. It isn't strictly Fortran2008, but it is supported by both gfortran and ifort, so it's good enough for me. (I sure appreciate some of those highly-compatible extensions, they make my life easier!)