PR lto/84212 - -Wno-* does not disable warnings from -flto link stage
[official-gcc.git] / gcc / testsuite / g++.dg / warn / Wunused-var-11.C
blobc7c1bf35ff7b3a613ff8372666426cc4ce7d4a94
1 // PR c++/44412
2 // { dg-do compile }
3 // { dg-options "-Wunused" }
5 struct S
7   int foo ();
8   static int bar ();
9 };
11 int S::foo ()
13   return 5;
16 int S::bar ()
18   return 6;
21 int
22 f1 ()
24   S s;
25   return s.foo ();
28 int
29 f2 ()
31   S s;
32   return s.bar ();