1 // { dg-do compile }
2 // { dg-options "-Wunused-label" }
3 
4 extern void f9();
5 
6 template<int i>
7 void
f1()8 f1()
9 {
10   if (i)
11     return;
12 
13  l1: f9();				// { dg-warning "not used" }
14  l3: ; f9();				// { dg-warning "not used" }
15  l4: __attribute__ ((unused)) ; f9();
16 }
17 
18 template
19 void f1<0>();
20 
21 template<int i>
22 void
f2()23 f2()
24 {
25   if (i)
26     return;
27 
28  l1: f9();				// { dg-warning "not used" }
29  l3: ; f9();				// { dg-warning "not used" }
30  l4: __attribute__ ((unused)) ; f9();
31 }
32 
33 template
34 void f2<1>();
35 
36 template<int i>
37 void
f3()38 f3()
39 {
40   void* lab;
41  l1: f9();
42  l2: __attribute__ ((unused)) ; f9();
43   lab = i ? &&l1 : &&l2;
44   goto *lab;
45 }
46 
47 template
48 void f3<0>();
49 
50 template
51 void f3<1>();
52