From: Janne Blomqvist Date: Sat, 15 Oct 2016 13:15:26 +0000 (+0300) Subject: PR 48587 Newunit allocator X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e2a02db7690190247c42bf233384530ef65d8881;p=gcc.git PR 48587 Newunit allocator 2016-10-15 Janne Blomqvist PR libfortran/48587 * gfortran.dg/negative_unit2.f90: New testcase. From-SVN: r241200 --- 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