OSDN Git Service

PR c++/9335
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / chmod_1.f90
index e9ea27f..07760cf 100644 (file)
@@ -1,5 +1,6 @@
-! { dg-do run }
+! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* spu-*-* } } } }
 ! { dg-options "-std=gnu" }
+! See PR38956.  Test fails on cygwin when user has Administrator rights
   implicit none
   character(len=*), parameter :: n = "foobar_file"
   integer :: i
@@ -20,7 +21,7 @@
   end if
 
   call chmod (n, "a-w", i)
-  if (i == 0) then
+  if (i == 0 .and. getuid() /= 0) then
     if (access(n,"w") == 0 .or. access(n,"W") == 0) call abort
   end if