1! { dg-do run } 2! pr24719, non-advancing read should read more than one line 3! test contributed by jerry delisle <jvdelisle@gcc.gnu.org> 4 implicit none 5 character(1) :: chr 6 character(20) :: correct = 'foo: bar 123abc' 7 integer :: i 8 open(unit = 11, status = "scratch", action="readwrite") 9 write(11,'(a)') "foo: bar" 10 write(11,'(a)') "123abc" 11 rewind(11) 12 i = 0 13 do 14 i = i + 1 1510 read(unit = 11, fmt = '(a)', advance = 'no', end = 99, eor = 11) chr 16 if (chr.ne.correct(i:i)) STOP 1 17 cycle 1811 continue 19 end do 2099 close(11) 21 end 22