| 1 |
! { dg-do run } |
| 2 |
! { dg-shouldfail "Cannot open file" } |
| 3 |
! PR 64770 SIGSEGV when trying to open an existing file with status="new" |
| 4 |
program pr64770 |
| 5 |
implicit none |
| 6 |
! Make sure pr64770test.dat exists |
| 7 |
open(99, file="pr64770test.dat", status="replace") |
| 8 |
close(99) |
| 9 |
open(99, file="pr64770test.dat", access="stream", form="unformatted", & |
| 10 |
status="new") |
| 11 |
end program pr64770 |
| 12 |
! { dg-output "At line 10 of file.*" } |
| 13 |
! { dg-output "Fortran runtime error: Cannot open file .pr64770test.dat.:" } |
| 14 |
! { dg-final { remote_file build delete "pr64770test.dat" } } |