diff options
author | jb <jb@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-10-15 13:15:26 +0000 |
---|---|---|
committer | jb <jb@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-10-15 13:15:26 +0000 |
commit | c2aace28a0491d95d70f29199789c7516996cca5 (patch) | |
tree | b010e2a6d5e1a96625e855f9a2a8af8b2284d533 | |
parent | 5ba96fdd1a43f0b66fac16cc0dae6ba71d379fc7 (diff) | |
download | gcc-c2aace28a0491d95d70f29199789c7516996cca5.tar.gz |
PR 48587 Newunit allocator
2016-10-15 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/48587
* gfortran.dg/negative_unit2.f90: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241200 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/testsuite/gfortran.dg/negative_unit2.f90 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/negative_unit2.f90 b/gcc/testsuite/gfortran.dg/negative_unit2.f90 new file mode 100644 index 00000000000..e7fb85e5bff --- /dev/null +++ b/gcc/testsuite/gfortran.dg/negative_unit2.f90 @@ -0,0 +1,9 @@ +! { dg-do run } +! Test case submitted by Dominique d'Humieres +program negative_unit2 + integer :: i, j + ! i should be <= NEWUNIT_FIRST in libgfortran/io/unit.c + i = -100 + write(unit=i,fmt=*, iostat=j) 10 + if (j == 0) call abort +end program negative_unit2 |