* tree-loop-distribution.c (struct partition): New field recording
[official-gcc.git] / gcc / testsuite / gfortran.dg / open_readonly_1.f90
blob87d3ba7a9092b5b1c94266f54cfe4a6cafc7b70d
1 ! { dg-do run { target fd_truncate } }
2 ! PR19451
3 ! Writing to a non-empty readonly file caused a segfault.
4 ! We were still trying to write the EOR after an error ocurred
5 program prog
6 open (unit=10, file='PR19451.dat')
7 write (10,*) "Hello World"
8 close (10)
9 open (unit=10, file='PR19451.dat', action="read")
10 write (10,*,err=20) "Hello World"
11 call abort()
12 20 close (10, status='delete')
13 end program