Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gfortran.dg / backspace_2.f
blob3b633355b2b32d3e17c375f54ffcb77992bcebe9
1 ! { dg-do run { target fd_truncate } }
2 ! PR25139 Repeated backspaces and reads.
3 ! Derived from example given in PR by Dale Ranta and FX Coudert
4 ! Contributed by Jerry DeLisle <jvdelisle@gcc.gnu.org>
5 integer dat(5)
6 dat = (/ 0, 0, 0, 0, 1 /)
7 write(11) dat,dat,dat,dat
8 rewind 11
9 write(11) dat
10 read(11,end=1008) dat
11 call abort()
12 1008 continue
13 backspace 11
14 write(11) dat
15 read(11,end=1011) dat
16 call abort()
17 1011 continue
18 backspace 11
19 backspace 11
20 close(11, status='delete')
21 end