PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / contained_1.f90
blob142bc3f61731a99e52324b6c347ea3779864637c
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
20 subroutine sub (proc, var)
21 external proc1
22 integer var
24 if (var .ne. 42) STOP 1
25 call proc
26 end subroutine
28 program contained_1
29 use contained_1_mod
30 i = 0
31 call a
32 if (i .ne. 1) STOP 2
33 end program