AArch64: correct constraint on Upl early clobber alternatives
[official-gcc.git] / gcc / testsuite / gfortran.dg / backspace_10.f90
bloba5c48246e4a8efda8aabeb7ef0ca83b7eb81d667
1 ! { dg-do run }
2 ! PR33307 I/O read/positioning problem - in BACKSPACE
3 ! Test case devloped from test in PR by Jerry DeLisle <jvdelisle@gcc.gnu.org>
4 program gfcbug69b
5 ! Modified example program
6 implicit none
7 integer, parameter :: iunit = 63
8 integer :: istat, k, ios
9 character(len=20) :: line, message
11 open (iunit)
12 write (iunit, '(a)') "! ***Remove this line***"
13 write (iunit, '(a)') "&FOO file='foo' /"
14 write (iunit, '(a)', advance="no") "&BAR file='bar' /"
15 close (iunit)
16 ! Note: Failure occurred only when ACTION="read" was specified
17 open (iunit, action="read", status="old")
19 read (iunit,'(a)',iostat=ios) line
20 if (ios /= 0) STOP 1
21 read (iunit,'(a)',iostat=ios) line
22 if (ios /= 0) STOP 2
23 read (iunit,'(a)',iostat=ios) line
24 if (ios /= 0) STOP 3
25 read (iunit,'(a)',iostat=ios) line
26 if (ios /= 0) backspace (iunit)
27 rewind (iunit)
28 read (iunit,'(a)',iostat=ios) line
29 if (ios /= 0) STOP 4
30 read (iunit,'(a)',iostat=ios) line
31 if (ios /= 0) STOP 5
32 read (iunit,'(a)',iostat=ios) line
33 if (ios /= 0) STOP 6
34 read (iunit,'(a)',iostat=ios) line
35 if (ios /= -1) STOP 7
36 close (iunit, status="delete")
37 end program gfcbug69b