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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [backspace_10.f90] - Blame information for rev 749

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! PR33307 I/O read/positioning problem - in BACKSPACE
3
! Test case devloped from test in PR by Jerry DeLisle  
4
program gfcbug69b
5
  ! Modified example program
6
  implicit none
7
  integer, parameter :: iunit = 63
8
  integer            :: istat, k, ios
9
  character(len=20) :: line, message
10
 
11
  open (iunit)
12
  write (iunit, '(a)') "! ***Remove this line***"
13
  write (iunit, '(a)') "&FOO        file='foo' /"
14
  write (iunit, '(a)', advance="no") "&BAR        file='bar' /"
15
  close (iunit)
16
! Note: Failure occurred only when ACTION="read" was specified
17
  open (iunit, action="read", status="old")
18
 
19
  read (iunit,'(a)',iostat=ios) line
20
  if (ios /= 0) call abort
21
  read (iunit,'(a)',iostat=ios) line
22
  if (ios /= 0) call abort
23
  read (iunit,'(a)',iostat=ios) line
24
  if (ios /= 0) call abort
25
  read (iunit,'(a)',iostat=ios) line
26
  if (ios /= 0) backspace (iunit)
27
  rewind (iunit)
28
  read (iunit,'(a)',iostat=ios) line
29
  if (ios /= 0) call abort
30
  read (iunit,'(a)',iostat=ios) line
31
  if (ios /= 0) call abort
32
  read (iunit,'(a)',iostat=ios) line
33
  if (ios /= 0) call abort
34
  read (iunit,'(a)',iostat=ios) line
35
  if (ios /= -1) call abort
36
  close (iunit, status="delete")
37
end program gfcbug69b

powered by: WebSVN 2.1.0

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