111
|
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 }
|
|
6 module contained_1_mod
|
|
7 integer i
|
|
8 contains
|
|
9 subroutine a
|
|
10 integer :: c = 42
|
|
11 call sub(b, c)
|
|
12 end subroutine a
|
|
13 subroutine b()
|
|
14 i = i + 1
|
|
15 end subroutine b
|
|
16 subroutine c
|
|
17 end subroutine
|
|
18 end module
|
|
19
|
|
20 subroutine sub (proc, var)
|
|
21 external proc1
|
|
22 integer var
|
|
23
|
131
|
24 if (var .ne. 42) STOP 1
|
111
|
25 call proc
|
|
26 end subroutine
|
|
27
|
|
28 program contained_1
|
|
29 use contained_1_mod
|
|
30 i = 0
|
|
31 call a
|
131
|
32 if (i .ne. 1) STOP 2
|
111
|
33 end program
|