PR ipa/83051
[official-gcc.git] / gcc / testsuite / gfortran.dg / large_unit_1.f90
blob60e2d1f17e89d0a9a5811c73ef756d64ea17bc74
1 ! { dg-do run }
2 ! { dg-shouldfail "Unit number in I/O statement too large" }
3 ! PR31201 Unit number in I/O statement too large
4 ! Test case from PR
5 integer(kind=8) :: k= 2_8**36 + 10
6 integer(kind=4) :: j= 10
7 logical ex,op
8 INQUIRE(unit=k, exist=ex,opened=op)
9 print *, ex, op
10 IF (ex) THEN
11 OPEN(unit=k)
12 INQUIRE(unit=j, opened=op)
13 IF (op) CALL ABORT()
14 ENDIF
15 print *, k
16 close(k)
17 end