1 ! { dg-do run { target fd_truncate } }
3 ! Writing to a non-empty readonly file caused a segfault.
4 ! We were still trying to write the EOR after an error ocurred
6 open (unit=10, file='PR19451.dat')
7 write (10,*) "Hello World"
9 open (unit=10, file='PR19451.dat', action="read")
10 write (10,*,err=20) "Hello World"
12 20 close (10, status='delete')