aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/negative_unit2.f90
blob: 85da3518c6624df3c1c81b3d1a84ac9295d8c660 (plain)
1
2
3
4
5
6
7
8
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) STOP 1
end program negative_unit2