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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [inquire_size.f90] - Blame information for rev 708

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! PR43409 I/O: INQUIRE for SIZE does not work.
3
integer :: i
4
character(30) :: aname = "noname"
5
logical :: is_named
6
 
7
open(25, file="testfile", status="replace", access="stream", form="unformatted")
8
do i=1,100
9
  write(25) i, "abcdefghijklmnopqrstuvwxyz"
10
enddo
11
! Gfortran implicitly flushes the buffer when doing a file size
12
! inquire on an open file.
13
! flush(25)
14
 
15
inquire(unit=25, named=is_named, name=aname, size=i)
16
if (.not.is_named) call abort
17
if (aname /= "testfile") call abort
18
if (i /= 3000) call abort
19
 
20
inquire(file="testfile", size=i)
21
if (.not.is_named) call abort
22
if (aname /= "testfile") call abort
23
if (i /= 3000) call abort
24
 
25
close(25, status="delete")
26
inquire(file="testfile", size=i)
27
if (i /= -1)  call abort
28
end
29
 
30
 

powered by: WebSVN 2.1.0

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