From 4c22e58cdefc08228ae660f889d64390cb5e082f Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Sun, 29 Mar 2015 14:20:29 +0000 Subject: [PATCH] re PR target/65564 (builtin-bnd-narrow-ptr-bounds-2-nov.c:15:1: internal compiler error: in simplify_subreg, at simplify-rtx.c:5745) 2015-03-29 Thomas Koenig PR libgfortran/65564 * gfortran.dg/open_errors_2.f90: New test. From-SVN: r221761 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/open_errors_2.f90 | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/open_errors_2.f90 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8f489ee3354..e52edebafc5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-03-29 Thomas Koenig + + PR libgfortran/65564 + * gfortran.dg/open_errors_2.f90: New test. + 2015-03-28 Jerry DeLisle PR libgfortran/65596 diff --git a/gcc/testsuite/gfortran.dg/open_errors_2.f90 b/gcc/testsuite/gfortran.dg/open_errors_2.f90 new file mode 100644 index 00000000000..5b418349e19 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/open_errors_2.f90 @@ -0,0 +1,18 @@ +! { dg-do run } +! { dg-shouldfail "runtime error" } +! { dg-output "At line 13.*File already opened" } + +! PR 65563 - this used to segfault for some versions. + variable_1 = 0 + open(345,iostat=ios, form='unformatted') + read(345, err=37, end=37) variable_1 + close(345) + go to 38 +37 continue +38 continue + open(522, file="fort.345", form='unformatted') + write(522) variable_1 + rewind(522) + close(522) +end program +! { dg-final { remote_file build delete "fort.345" } } -- 2.30.2