diff options
-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 |