PR PR38956 is the failure of testsuite/gfortran.dg/chmod_{1,2,3}.f90 on i686-pc-cygwin.
The problem is due to a mismatch between Windows and POSIX file access models.
Under Windows, accounts with Administrator rights can write to any file
regardless of the file permission. There is no easy way to check for this
from Fortran.
This patch removes the failing parts of tests chmod_{1,2,3}.f90 and
adds them to a new test chmod_4.f90
Likewise for gfortran.dg/open_errors.f90.
2009-01-29 David Billinghurst (billingd@gcc.gnu.org)
PR fortran/38956
* gfortran.dg/chmod_1.f90: Remove test that fails on cygwin
* gfortran.dg/chmod_2.f90: Likewise
* gfortran.dg/chmod_3.f90: Likewise
* gfortran.dg/open_errors.f90: Likewise
* gfortran.dg/chmod_4.f90: New test with failing tests above.
* gfortran.dg/open_errors_2.f90: Likewise
Index: chmod_1.f90
===================================================================
--- chmod_1.f90 (revision 143773)
+++ chmod_1.f90 (working copy)
@@ -19,11 +19,6 @@
if (access(n,"x") /= 0 .or. access(n,"X") /= 0) call abort
end if
- call chmod (n, "a-w", i)
- if (i == 0 .and. getuid() /= 0) then
- if (access(n,"w") == 0 .or. access(n,"W") == 0) call abort
- end if
-
open (10,file=n)
close (10,status="delete")