From e2a02db7690190247c42bf233384530ef65d8881 Mon Sep 17 00:00:00 2001 From: Janne Blomqvist Date: Sat, 15 Oct 2016 16:15:26 +0300 Subject: [PATCH] PR 48587 Newunit allocator 2016-10-15 Janne Blomqvist PR libfortran/48587 * gfortran.dg/negative_unit2.f90: New testcase. From-SVN: r241200 --- gcc/testsuite/gfortran.dg/negative_unit2.f90 | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/negative_unit2.f90 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 -- 2.30.2