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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [stat_2.f90] - Rev 154

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

! { dg-do run }
! { dg-options "-std=gnu" }
  character(len=*), parameter :: f = "testfile"
  integer :: s1(13), r1, s2(13), r2, s3(13), r3
  
  open (10,file=f)
  write (10,"(A)") "foo"
  close (10,status="keep")

  open (10,file=f)
  r1 = lstat (f, s1)
  r2 = stat (f, s2)
  r3 = fstat (10, s3)

  if (r1 /= 0 .or. r2 /= 0 .or. r3 /= 0) call abort
  if (any (s1 /= s2) .or. any (s1 /= s3)) call abort
  if (s1(5) /= getuid()) call abort
  if (s1(6) /= getgid() .and. getgid() /= 0) call abort
  if (s1(8) < 3 .or. s1(8) > 5) call abort

  close (10,status="delete")
  end

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

powered by: WebSVN 2.1.0

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