summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/whole_file_22.f90
blob: 4e229207ccdda13681f2e0b0ebaa7a6e9dc6d81b (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
38
! { 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