OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [newunit_1.f90] - Rev 399

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

! { dg-do run }
! PR40008 F2008: Add NEWUNIT= for OPEN statement 
! Contributed by Jerry DeLisle <jvdelisle@gcc.gnu.org>
program newunit_1
  character(len=25) :: str
  integer(1) :: myunit, myunit2
  myunit = 25
  str = "bad"
  open(newunit=myunit, status="scratch")
  open(newunit = myunit2, file="newunit_1file")
  write(myunit,'(e24.15e2)') 1.0d0
  write(myunit2,*) "abcdefghijklmnop"
  flush(myunit)
  rewind(myunit)
  rewind(myunit2)
  read(myunit2,'(a)') str
  if (str.ne." abcdefghijklmnop") call abort
  close(myunit)
  close(myunit2, status="delete")
end program newunit_1

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.