aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJanne Blomqvist <jb@gcc.gnu.org>2016-10-15 16:15:26 +0300
committerJanne Blomqvist <jb@gcc.gnu.org>2016-10-15 16:15:26 +0300
commite2a02db7690190247c42bf233384530ef65d8881 (patch)
treeb010e2a6d5e1a96625e855f9a2a8af8b2284d533 /gcc
parentc04d4ede178fcb2e1d216ebf616786ca8c6cbe1c (diff)
downloadgcc-e2a02db7690190247c42bf233384530ef65d8881.zip
gcc-e2a02db7690190247c42bf233384530ef65d8881.tar.gz
gcc-e2a02db7690190247c42bf233384530ef65d8881.tar.bz2
PR 48587 Newunit allocator
2016-10-15 Janne Blomqvist <jb@gcc.gnu.org> PR libfortran/48587 * gfortran.dg/negative_unit2.f90: New testcase. From-SVN: r241200
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gfortran.dg/negative_unit2.f909
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 0000000..e7fb85e
--- /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