aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/whole_file_22.f90
blob: 69e8107d63cff92fb85d34a4ffdc64e9b5827bbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
! { dg-do link }
! { dg-options "-fwhole-program -O3 -g" }
!
! PR fortran/40873
!
      program prog
        call one()
        call two()
        call test()
      end program prog
      subroutine one()
        call three()
      end subroutine one
      subroutine two()
        call three()
      end subroutine two
      subroutine three()
      end subroutine three

SUBROUTINE c()
 CALL a()
END SUBROUTINE c

SUBROUTINE a()
END SUBROUTINE a

MODULE M
CONTAINS
 SUBROUTINE b()
   CALL c()
 END SUBROUTINE
END MODULE

subroutine test()
USE M
CALL b()
END