1 // PR c++/82799
2 // { dg-do compile }
3 // { dg-options "-Wunused-but-set-variable" }
4 
5 enum E { b };
6 struct C {
7   template <E>
fooC8   int foo ()
9   {
10     const bool i = 0;		// { dg-bogus "set but not used" }
11     const int r = i ? 7 : 9;
12     return r;
13   }
barC14   void bar () { foo <b> (); }
15 };
16