111
|
1 ! { dg-do link }
|
|
2 ! { dg-options "-fwhole-program -O3 -g" }
|
|
3 !
|
|
4 ! PR fortran/40873
|
|
5 !
|
|
6 program prog
|
|
7 call one()
|
|
8 call two()
|
|
9 call test()
|
|
10 end program prog
|
|
11 subroutine one()
|
|
12 call three()
|
|
13 end subroutine one
|
|
14 subroutine two()
|
|
15 call three()
|
|
16 end subroutine two
|
|
17 subroutine three()
|
|
18 end subroutine three
|
|
19
|
|
20 SUBROUTINE c()
|
|
21 CALL a()
|
|
22 END SUBROUTINE c
|
|
23
|
|
24 SUBROUTINE a()
|
|
25 END SUBROUTINE a
|
|
26
|
|
27 MODULE M
|
|
28 CONTAINS
|
|
29 SUBROUTINE b()
|
|
30 CALL c()
|
|
31 END SUBROUTINE
|
|
32 END MODULE
|
|
33
|
|
34 subroutine test()
|
|
35 USE M
|
|
36 CALL b()
|
|
37 END
|