gcc/testsuite/gfortran.dg/large_unit_2.f90
raw| 1 | ! { dg-do run } |
| 2 | ! PR31201 Too large unit number generates wrong code |
| 3 | ! Test case by Francois-Xavier Coudert <[email protected]> |
| 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) STOP 1 |
| 9 | open(2_8*huge(0)+20_8,file="foo",err=99) |
| 10 | STOP 2 |
| 11 | 99 inquire(unit=18,opened=l) |
| 12 | if (l) STOP 3 |
| 13 | end |