annotate gcc/testsuite/gfortran.dg/streamio_5.f90 @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do run }
kono
parents:
diff changeset
2 ! PR25828 Stream IO test 5, unformatted single byte
kono
parents:
diff changeset
3 ! Contributed by Jerry DeLisle <jvdelisle@verizon.net>.
kono
parents:
diff changeset
4 program streamtest5
kono
parents:
diff changeset
5 implicit none
kono
parents:
diff changeset
6 character(1) :: lf = char(10)
kono
parents:
diff changeset
7 character(1) :: tchar
kono
parents:
diff changeset
8 integer :: i,j,k
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 open(10, file="teststream_streamio_5", access="stream", form="unformatted")
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 do i=1,1229
kono
parents:
diff changeset
13 do j=0,9
kono
parents:
diff changeset
14 write(10) j
kono
parents:
diff changeset
15 end do
kono
parents:
diff changeset
16 write(10) lf
kono
parents:
diff changeset
17 end do
kono
parents:
diff changeset
18
kono
parents:
diff changeset
19 close(10)
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 open(10, file="teststream_streamio_5", access="stream", form="unformatted")
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 do i=1,1229
kono
parents:
diff changeset
24 do j=0,9
kono
parents:
diff changeset
25 read(10) k
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
26 if (k.ne.j) STOP 1
111
kono
parents:
diff changeset
27 end do
kono
parents:
diff changeset
28 read(10) tchar
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
29 if (tchar.ne.lf) STOP 2
111
kono
parents:
diff changeset
30 end do
kono
parents:
diff changeset
31 close(10,status="delete")
kono
parents:
diff changeset
32 end program streamtest5