PR target/83368
[official-gcc.git] / gcc / testsuite / gfortran.dg / warn_unused_function_2.f90
blob43b211e57bfe41c2a24f2c3c39454c992f670f00
1 ! { dg-do compile }
2 ! { dg-options "-Wall" }
4 ! [4.8 Regression] PR 54997: -Wunused-function gives false warnings
5 ! PR 54224: missing warnings with -Wunused-function
7 ! Contributed by Janus Weil <janus@gcc.gnu.org>
9 module m
11 implicit none
12 private :: s1,s2,s3
14 contains
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
23 subroutine s2(dummy) ! { dg-warning "Unused dummy argument" }
24 procedure() :: dummy
25 end subroutine
27 subroutine s3()
28 end subroutine
30 end module
33 subroutine sub
34 entry en
35 end subroutine
37 program test
38 contains
39 subroutine s5 ! { dg-warning "defined but not used" }
40 end subroutine
41 end