From 0daf734313c87d624776c7444f9e6bb901638e29 Mon Sep 17 00:00:00 2001 From: Janne Blomqvist Date: Mon, 26 Jan 2015 01:04:50 +0200 Subject: [PATCH] PR 64770 Make testcase work properly under DejaGNU. 2015-01-26 Janne Blomqvist PR libfortran/64770 * gfortran.dg/open_new_segv.f90: Add dg- stuff to make test work correctly, clean up afterwards. From-SVN: r220098 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gfortran.dg/open_new_segv.f90 | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 861508782f5..31b999b515c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2015-01-26 Janne Blomqvist + + PR libfortran/64770 + * gfortran.dg/open_new_segv.f90: Add dg- stuff to make test work + correctly, clean up afterwards. + 2015-01-25 Mikael Morin PR fortran/62044 diff --git a/gcc/testsuite/gfortran.dg/open_new_segv.f90 b/gcc/testsuite/gfortran.dg/open_new_segv.f90 index 56cd1afd9b5..fe548f1a196 100644 --- a/gcc/testsuite/gfortran.dg/open_new_segv.f90 +++ b/gcc/testsuite/gfortran.dg/open_new_segv.f90 @@ -1,4 +1,5 @@ ! { dg-do run } +! { dg-shouldfail "File already exists" } ! PR 64770 SIGSEGV when trying to open an existing file with status="new" program pr64770 implicit none @@ -8,3 +9,6 @@ program pr64770 open(99, file="pr64770test.dat", access="stream", form="unformatted", & status="new") end program pr64770 +! { dg-output "At line 10 of file.*" } +! { dg-output "Fortran runtime error: File .pr64770test.dat. already exists" } +! { dg-final { remote_file build delete "pr64770test.dat" } } -- 2.30.2