blob: 43b211e57bfe41c2a24f2c3c39454c992f670f00 (
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
39
40
41
|
! { dg-do compile }
! { dg-options "-Wall" }
!
! [4.8 Regression] PR 54997: -Wunused-function gives false warnings
! PR 54224: missing warnings with -Wunused-function
!
! Contributed by Janus Weil <janus@gcc.gnu.org>
module m
implicit none
private :: s1,s2,s3
contains
subroutine s1 ! { dg-warning "defined but not used" }
call s2(s3)
contains
subroutine s4 ! { dg-warning "defined but not used" }
end subroutine
end subroutine
subroutine s2(dummy) ! { dg-warning "Unused dummy argument" }
procedure() :: dummy
end subroutine
subroutine s3()
end subroutine
end module
subroutine sub
entry en
end subroutine
program test
contains
subroutine s5 ! { dg-warning "defined but not used" }
end subroutine
end
|