aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/ftell_1.f90
blob: 3e622def9277880524c1e222616b640e6cb510f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
! { dg-do run }
  integer(kind=8) o, o2

  open (10, status="scratch")
  call ftell (10, o)
  if (o /= 0) STOP 1
  write (10,"(A)") "1234567"
  call ftell (10, o)
  if (o /= 8 .and. o /= 9) STOP 2
  write (10,"(A)") "1234567"
  call ftell (10, o2)
  if (o2 /= 2 * o) STOP 3
  close (10)
  call ftell (10, o)
  if (o /= -1) STOP 4
  end