diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/backspace_4.f')
-rw-r--r-- | gcc/testsuite/gfortran.dg/backspace_4.f | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/backspace_4.f b/gcc/testsuite/gfortran.dg/backspace_4.f new file mode 100644 index 000000000..69e0f40c7 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/backspace_4.f @@ -0,0 +1,18 @@ +! { dg-do run } +! PR25598 Error on repeated backspaces. +! Derived from example given in PR by Dale Ranta +! Contributed by Jerry DeLisle <jvdelisle@gcc.gnu.org> + integer data + data=-1 + open(unit=11,status='scratch',form='unformatted') + write(11)data + read(11,end= 1000 )data + call abort() + 1000 continue + backspace 11 + backspace 11 + read(11,end= 1001 )data + 1001 continue + if (data.ne.-1) call abort + close(11) + end |