Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gfortran.dg / streamio_3.f90
blob0cbab67f6d81ef7db6302ba4b8c8a5e7963b6dba
1 ! { dg-do run { target fd_truncate } }
2 ! PR25828 Stream IO test 3, tests read_x and inquire.
3 ! Contributed by Jerry DeLisle <jvdelisle@verizon.net>.
4 program streamio_3
5 implicit none
6 integer :: i(6),j
7 character(10) :: myaccess
8 open(10, access="stream", form="formatted")
9 i = (/(j,j=1,6)/)
10 write(10,'(3(2x,i4/)/3(3x,i6/))') i
11 i = 0
12 rewind(10)
13 read(10,'(3(2x,i4/)/3(3x,i6/))') i
14 if (any(i.ne.(/(j,j=1,6)/))) call abort()
15 inquire(unit=10, access=myaccess)
16 if (myaccess.ne."STREAM") call abort()
17 close(10,status="delete")
18 end program streamio_3