This patch extend the cleaning proposed in http://gcc.gnu.org/ml/fortran/2013-10/msg00083.html to opened files. The patch is mostly obvious except for gfortran.dg/open_negative_unit_1.f90 for which I assumed that the second OPEN closes the file foo.txt without deleting it (and that it is the intended behavior). I have also added the INQUIRE as a test for PR59419.
After this patch there is no left file in the gcc/testsuite/gfortran directory. Note that the files m.mod or fort.10 are generated by several tests. I am pretty sure that some of them do not do the cleaning, but I did not have tha patience to look for them. OK? If yes, I don't have write access (while I have the FSF papers signed) and someone will have to do the commit for me. TIA Dominique PS Darwin users whould run rm -rf gcc/testsuite/gfortran*/*.dSYM before checking for left files. For those interested I have a patch for doing the cleaning automaticaly.
CL
Description: Binary data
patch-clean
Description: Binary data