blob: 6f36ca04d31e0f5630d072ad105a94a5763c13c5 [file] [log] [blame]
! { dg-do run }
! PR 18982: verifies that opening an existing file with
! status="new" is an error
program main
nout = 10
open(nout, file="foo_open_new.dat", status="replace") ! make sure foo_open_new.dat exists
close(nout)
open(nout, file="foo_open_new.dat", status="new",err=100)
call abort ! This should never happen
100 call unlink ("foo_open_new.dat")
end program main