1 ! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* spu-*-* } } } }
2 ! { dg-options "-std=gnu -fdefault-integer-8" }
3 ! See PR38956. Test fails on cygwin when user has Administrator rights
5 character(len
=*), parameter :: n
= "foobar_file_chmod_3"
9 close (10,status
="delete")
12 close (10,status
="keep")
14 if (access(n
,"") /= 0 .or
. access(n
," ") /= 0 .or
. access(n
,"r") /= 0 .or
. &
15 access(n
,"R") /= 0 .or
. access(n
,"w") /= 0 .or
. access(n
,"W") /= 0) &
20 if (access(n
,"x") /= 0 .or
. access(n
,"X") /= 0) call abort
24 if (i
== 0 .and
. getuid() /= 0) then
25 if (access(n
,"w") == 0 .or
. access(n
,"W") == 0) call abort
29 close (10,status
="delete")
31 if (access(n
,"") == 0 .or
. access(n
," ") == 0 .or
. access(n
,"r") == 0 .or
. &
32 access(n
,"R") == 0 .or
. access(n
,"w") == 0 .or
. access(n
,"W") == 0) &