2009-10-05 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / large_unit_2.f90
blob5f3554cc5bbe090a5c92e9ca69a2cb5a2f3f41de
1 ! { dg-do run }
2 ! PR31201 Too large unit number generates wrong code
3 ! Test case by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4 integer :: i
5 logical :: l
6 character(len=60) :: s
7 open(2_8*huge(0)+20_8,file="foo",iostat=i)
8 if (i == 0) call abort
9 open(2_8*huge(0)+20_8,file="foo",err=99)
10 call abort
11 99 inquire(unit=18,opened=l)
12 if (l) call abort
13 end