summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/gfortran.dg/backspace_8.f
blob: c25dd5b4300d72661affb48766cddf9f5d20229c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
C { dg-do run { target fd_truncate } }
C PR libfortran/31618 - backspace after an error didn't work.
      program main
      character*78 msg
      open (21, file="backspace_7.dat", form="unformatted")
      write (21) 42, 43
      write (21) 4711, 4712
      write (21) -1, -4
      rewind (21)
      read (21) i,j
      read (21,err=100,end=100) i,j,k
      call abort
 100  continue
      backspace 21
      read (21) i,j
      if (i .ne. 4711 .or. j .ne. 4712) call abort
      close (21,status="delete")
      end
OpenPOWER on IntegriCloud