fix pr/45972
[official-gcc.git] / gcc / testsuite / gfortran.dg / nesting_1.f90
blob51ebfd999a8bba4ce7cc4db6716c113b48d164fb
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
12 subroutine c(m)
13 if (m/=1) call abort
14 end subroutine c
15 end subroutine a
17 call a(0)
18 end