OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [chmod_2.f90] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do run }
2
! { dg-options "-std=gnu" }
3
  implicit none
4
  character(len=*), parameter :: n = "foobar_file"
5
  integer :: i
6
 
7
  open (10,file=n)
8
  close (10,status="delete")
9
 
10
  open (10,file=n)
11
  close (10,status="keep")
12
 
13
  if (access(n,"") /= 0 .or. access(n," ") /= 0 .or. access(n,"r") /= 0 .or. &
14
      access(n,"R") /= 0 .or. access(n,"w") /= 0 .or. access(n,"W") /= 0) &
15
    call abort
16
 
17
  i = chmod (n, "a+x")
18
  if (i == 0) then
19
    if (access(n,"x") /= 0 .or. access(n,"X") /= 0) call abort
20
  end if
21
 
22
  i = chmod (n, "a-w")
23
  if (i == 0 .and. getuid() /= 0) then
24
    if (access(n,"w") == 0 .or. access(n,"W") == 0) call abort
25
  end if
26
 
27
  open (10,file=n)
28
  close (10,status="delete")
29
 
30
  if (access(n,"") == 0 .or. access(n," ") == 0 .or. access(n,"r") == 0 .or. &
31
      access(n,"R") == 0 .or. access(n,"w") == 0 .or. access(n,"W") == 0) &
32
    call abort
33
 
34
  end

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.