aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/ftell_2.f90
blob: ea9da060978998c915c18cf2c26c1f376289b879 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
! { dg-do run }
  integer(kind=8) o
  open (10, status="scratch")
  if (ftell(10) /= 0) STOP 1
  write (10,"(A)") "1234567"
  if (ftell(10) /= 8 .and. ftell(10) /= 9) STOP 2
  o = ftell(10)
  write (10,"(A)") "1234567"
  if (ftell(10) /= 2 * o) STOP 3
  close (10)
  if (ftell(10) /= -1) STOP 4
  end