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
// { dg-do assemble } // { dg-options "-Wunused" } template <class T> struct S { struct R { R(); ~R(); }; void foo() { R r; // no warning int i; // { dg-warning "" } unused } S(); ~S(); }; void f() { S<int> si; si.foo(); }