1! PR15986
2! Siblings may be used as actual arguments, in which case they look like
3! variables during parsing.  Also checks that actual variables aren't replaced
4! by siblings with the same name
5! { dg-do run }
6module contained_1_mod
7integer i
8contains
9subroutine a
10  integer :: c = 42
11  call sub(b, c)
12end subroutine a
13subroutine b()
14  i = i + 1
15end subroutine b
16subroutine c
17end subroutine
18end module
19
20subroutine sub (proc, var)
21  external proc1
22  integer var
23
24  if (var .ne. 42) STOP 1
25  call proc
26end subroutine
27
28program contained_1
29  use contained_1_mod
30  i = 0
31  call a
32  if (i .ne. 1) STOP 2
33end program
34