diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/eor_handling_4.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/eor_handling_4.f90 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/eor_handling_4.f90 b/gcc/testsuite/gfortran.dg/eor_handling_4.f90 new file mode 100644 index 000000000..300c10b82 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/eor_handling_4.f90 @@ -0,0 +1,17 @@ +! { dg-do run } +! PR 20092, 20131: Handle end-of-record condition with pad=yes (default) +! for standard input. This test case only really tests anything if, +! by changing unit 5, you get to manipulate the standard input. +program main + character(len=1) a(80) + close(5) + open(5,status="scratch") + write(5,'(A)') 'one', 'two', 's' + rewind(5) + do i=1,4 + read(5,'(80a1)') a + if (a(1) == 's') goto 100 + end do + call abort +100 continue +end program main |