2 ! { dg-options "-std=legacy" }
4 ! PR32235 incorrectly position text file after backspace
5 ! Test case from PR, prepared by Jerry DeLisle <jvdelisle@gcc.gnu.org>
12 write(10,"(a)") "Three"
20 if (a.ne."Three") call abort
21 close(10,status="delete")
24 2000 format('read =',a10)
27 subroutine inlist(ncards)
31 if (ncards.eq.0) go to 20
38 30 read(input,1000,end=60) data
41 if ((kard .eq. 1) .and. (DATA(1) .ne. "One")) call abort
42 if ((kard .eq. 2) .and. (DATA(1) .ne. "Two")) call abort
43 if ((kard .eq. 3) .and. (DATA(1) .ne. "Thre")) call abort
47 kard=kard - ncards + 1
55 2020 format (8x,i15,8x,20a4)