diff options
author | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-12-30 22:10:13 +0000 |
---|---|---|
committer | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-12-30 22:10:13 +0000 |
commit | 2e4b61899724a3e0c124217239141cfd1633ed39 (patch) | |
tree | 8ae75bef348e501781c5083ab2de1758658fe966 | |
parent | d810766f69a2c23d738ca471b727a22b4d878023 (diff) | |
download | gcc-2e4b61899724a3e0c124217239141cfd1633ed39.tar.gz |
2015-12-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/68987
* gfortran.dg/error_format_2.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232007 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/error_format_2.f90 | 16 |
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2981de99c58..ba9221cf4c9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-12-30 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + PR fortran/68987 + * gfortran.dg/error_format_2.f90: New test. + 2015-12-30 John David Anglin <danglin@gcc.gnu.org> * gfortran.dg/coarray_40.f90: Revise to use dg-additional-options. diff --git a/gcc/testsuite/gfortran.dg/error_format_2.f90 b/gcc/testsuite/gfortran.dg/error_format_2.f90 new file mode 100644 index 00000000000..421da9a0261 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/error_format_2.f90 @@ -0,0 +1,16 @@ +! { dg-do run } +! PR68987, this test case failed on a memory double free +program foo + call s('(foo)') +end program +subroutine s(fmt) + character (*) :: fmt + character (1) :: c + integer :: i + write (c, fmt, iostat=i) 42 + ! print *, i + if (i==0) call abort() + write (c, fmt, err=100) 42 + call abort() +100 continue +end subroutine |