summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/nesting_1.f90
blob: 09e93d258a2d22415a38b4f13543678088840137 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
! PR 18525
! we used to incorrectly refer to n from a when resolving the call to
! c from b
! { dg-do run }
subroutine a(n)
call b(n+1)
contains
  subroutine b(n)
    call c(n)
  end subroutine b

  subroutine c(m)
    if (m/=1) STOP 1
  end subroutine c
end subroutine a

call a(0)
end