summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/whole_file_19.f90
blob: 56f3cb69d8f4d9d4b198245eca8d93e61d326ad4 (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
! { dg-do compile }
! { dg-options "-fwhole-file" }
! Test the fix for pr40011 comment #42, in which the subroutine
! would just get lost with -fwhole-file.
!
! Contributed by Joost VandeVandole <jv244@cam.ac.uk>
!
SUBROUTINE c()
 CALL a()
END SUBROUTINE c

SUBROUTINE a()
END SUBROUTINE a

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

USE M
CALL b()
END
! { dg-final { cleanup-modules "m" } }