1! { dg-do run }
2! PR40714 A read hitting EOF should leave the unit structure in a correct state
3program test
4open(unit=32,status="scratch",access="sequential",form="unformatted")
5read(32,end=100)
6100 continue
7backspace(32)
8write (32)
9end program test
10