PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / gfortran.dg / large_unit_1.f90
blob11a946349c95b5f1fc9670aabc1259b8b00d3d75
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) STOP 1
14 ENDIF
15 print *, k
16 close(k)
17 end