annotate gcc/testsuite/gfortran.dg/streamio_10.f90 @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +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 ! PR25093 Stream IO test 10
kono
parents:
diff changeset
3 ! Contributed by Jerry DeLisle <jvdelisle@gcc.gnu.org>.
kono
parents:
diff changeset
4 ! Test case derived from that given in PR by Steve Kargl.
kono
parents:
diff changeset
5 program stream_io_10
kono
parents:
diff changeset
6 implicit none
kono
parents:
diff changeset
7 integer(kind=4) :: a(4), b(4)
kono
parents:
diff changeset
8 integer(kind=8) :: thepos
kono
parents:
diff changeset
9 a = (/ 1, 2, 3, 4 /)
kono
parents:
diff changeset
10 b = a
kono
parents:
diff changeset
11 open(10, file="teststream_streamio_10", access="stream")
kono
parents:
diff changeset
12 write(10) a
kono
parents:
diff changeset
13 inquire(10, pos=thepos)
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
14 if (thepos.ne.17) STOP 1
111
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 read(10, pos=1)
kono
parents:
diff changeset
17 inquire(10, pos=thepos)
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
18 if (thepos.ne.1) STOP 2
111
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 write(10, pos=15)
kono
parents:
diff changeset
21 inquire(10, pos=thepos)
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
22 if (thepos.ne.15) STOP 3
111
kono
parents:
diff changeset
23
kono
parents:
diff changeset
24 read(10, pos=3)
kono
parents:
diff changeset
25 inquire(10, pos=thepos)
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
26 if (thepos.ne.3) STOP 4
111
kono
parents:
diff changeset
27
kono
parents:
diff changeset
28 write(10, pos=1)
kono
parents:
diff changeset
29 inquire(10, pos=thepos)
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
30 if (thepos.ne.1) STOP 5
111
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 a = 0
kono
parents:
diff changeset
33 read(10) a
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
34 if (any(a /= b)) STOP 6
111
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 close(10, status="delete")
kono
parents:
diff changeset
37 end program stream_io_10