gcc/testsuite/gfortran.dg/assumed_rank_18.f90
raw| 1 | ! { dg-do run } |
| 2 | ! PR 91643 - this used to cause an ICE. |
| 3 | ! Original test case by Gerhard Steinmetz. |
| 4 | program p |
| 5 | real :: z(3) = [1.0, 2.0, 3.0] |
| 6 | call g(z) |
| 7 | contains |
| 8 | subroutine g(x) |
| 9 | real :: x(..) |
| 10 | select rank (x) |
| 11 | rank (1) |
| 12 | call h(x) |
| 13 | end select |
| 14 | end |
| 15 | subroutine h(x) |
| 16 | real :: x(*) |
| 17 | if (x(1) /= 1.0) stop 1 |
| 18 | end |
| 19 | end |