Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gfortran.dg/backspace_11.f90 @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 ! { dg-do run } |
2 ! PR 40334 backspace regression | |
3 program backspace_11 | |
4 implicit none | |
5 character(len=5) :: str | |
6 open(10, access='sequential', status='scratch') | |
7 write(10,'(A)')'HELLO' | |
8 rewind(10) | |
9 | |
10 do | |
11 read(10,'(A)',end=1) str | |
12 enddo | |
13 1 backspace 10 | |
14 !the file pointer is now at EOF | |
15 | |
16 read(10,*,end=2) str | |
131 | 17 STOP 1 |
111 | 18 2 backspace 10 |
19 !the file pointer is now at EOF | |
20 | |
21 read(10,'(A)',end=3) str | |
131 | 22 STOP 2 |
111 | 23 3 continue |
24 end program backspace_11 |