OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [ftell_3.f90] - Blame information for rev 862

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
! PR43605 FTELL intrinsic returns incorrect position
3
! Contributed by Janne Blomqvist, Manfred Schwarb
4
! and Dominique d'Humieres.
5
program ftell_3
6
  integer :: i
7
  character(len=99) :: buffer
8
  open(10, form='formatted', status='scratch', position='rewind')
9
  write(10, '(a)') '123456'
10
  write(10, '(a)') '789'
11
  write(10, '(a)') 'CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC'
12
  write(10, '(a)') 'DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD'
13
  rewind(10)
14
  read(10, '(a)') buffer
15
  call ftell(10, i)
16
  if(i /= 7) then
17
     call abort()
18
  end if
19
  read(10,'(a)') buffer
20
  if (trim(buffer) /= "789") then
21
     call abort()
22
  end if
23
  call ftell(10,i)
24
  if (i /= 11) then
25
     call abort()
26
  end if
27
  close(10)
28
end program ftell_3

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.