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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [stat_1.f90] - Blame information for rev 414

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
! { dg-skip-if "" { *-*-mingw* spu-*-* } { "*" } { "" } }
3
! { dg-options "-std=gnu" }
4
  character(len=*), parameter :: f = "testfile"
5
  integer :: s1(13), r1, s2(13), r2, s3(13), r3, d(13), rd
6
 
7
  open (10,file=f)
8
  write (10,"(A)") "foo"
9
  close (10,status="keep")
10
 
11
  open (10,file=f)
12
  call lstat (f, s1, r1)
13
  call stat (f, s2, r2)
14
  call fstat (10, s3, r3)
15
  call stat (".", d, rd)
16
 
17
  if (r1 /= 0 .or. r2 /= 0 .or. r3 /= 0 .or. rd /= 0) call abort
18
  if (any (s1 /= s2) .or. any (s1 /= s3)) call abort
19
  if (s1(5) /= getuid()) call abort
20
! If the test is run in a directory with the sgid bit set or on a filesystem
21
! mounted with the grpid option, new files are created with the directory's
22
! gid instead of the user's primary gid, so allow for that.
23
  if (s1(6) /= getgid() .and. s1(6) /= d(6) .and. getgid() /= 0) call abort
24
  if (s1(8) < 3 .or. s1(8) > 5) call abort
25
 
26
  close (10,status="delete")
27
  end

powered by: WebSVN 2.1.0

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