summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/whole_file_21.f90
blob: 2bd979dd40bbfcefb09afd5fe5c4937df661688d (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
! { dg-do link }
! PR fortran/40011
!
! Contributed by Joost VandeVondele
!
!
! Before no "one" function was generated with -fwhole-file.
!
!
SUBROUTINE one ( )
END SUBROUTINE one

SUBROUTINE two ( )
END SUBROUTINE two

MODULE mod
CONTAINS
  SUBROUTINE three ( )
    CALL two ( )
  END SUBROUTINE three
  SUBROUTINE four ( )
      CALL one ( )
  END SUBROUTINE four
END MODULE mod
END

! { dg-final { cleanup-modules "m" } }