Debian Codegraph @

gcc/testsuite/gfortran.dg/warn_unused_function_2.f90

raw
1 ! { dg-do compile }
2 ! { dg-options "-Wall" }
3 !
4 ! [4.8 Regression] PR 54997: -Wunused-function gives false warnings
5 ! PR 54224: missing warnings with -Wunused-function
6 !
7 ! Contributed by Janus Weil <[email protected]>
8
9 module m
10
11 implicit none
12 private :: s1,s2,s3
13
14 contains
15
16 subroutine s1 ! { dg-warning "defined but not used" }
17 call s2(s3)
18 contains
19 subroutine s4 ! { dg-warning "defined but not used" }
20 end subroutine
21 end subroutine
22
23 subroutine s2(dummy) ! { dg-warning "Unused dummy argument" }
24 procedure() :: dummy
25 end subroutine
26
27 subroutine s3()
28 end subroutine
29
30 end module
31
32
33 subroutine sub
34 entry en
35 end subroutine
36
37 program test
38 contains
39 subroutine s5 ! { dg-warning "defined but not used" }
40 end subroutine
41 end