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