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] - Blame information for rev 315

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

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
! PR40008 F2008: Add NEWUNIT= for OPEN statement
3
! Contributed by Jerry DeLisle 
4
program newunit_1
5
  character(len=25) :: str
6
  integer(1) :: myunit, myunit2
7
  myunit = 25
8
  str = "bad"
9
  open(newunit=myunit, status="scratch")
10
  open(newunit = myunit2, file="newunit_1file")
11
  write(myunit,'(e24.15e2)') 1.0d0
12
  write(myunit2,*) "abcdefghijklmnop"
13
  flush(myunit)
14
  rewind(myunit)
15
  rewind(myunit2)
16
  read(myunit2,'(a)') str
17
  if (str.ne." abcdefghijklmnop") call abort
18
  close(myunit)
19
  close(myunit2, status="delete")
20
end program newunit_1

powered by: WebSVN 2.1.0

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