gcc/testsuite/gfortran.dg/nesting_1.f90
raw| 1 | ! PR 18525 |
| 2 | ! we used to incorrectly refer to n from a when resolving the call to |
| 3 | ! c from b |
| 4 | ! { dg-do run } |
| 5 | subroutine a(n) |
| 6 | call b(n+1) |
| 7 | contains |
| 8 | subroutine b(n) |
| 9 | call c(n) |
| 10 | end subroutine b |
| 11 | |
| 12 | subroutine c(m) |
| 13 | if (m/=1) STOP 1 |
| 14 | end subroutine c |
| 15 | end subroutine a |
| 16 | |
| 17 | call a(0) |
| 18 | end |