/* { dg-do compile } */ /* { dg-require-effective-target lto } */ /* { dg-options "-flto -Wuninitialized -O1" } */ template struct Q1 { typedef int x; }; template struct Q2 { typename Q1::x f() { int k; return k; /* { dg-warning "'k' is used uninitialized in this function" } */ } }; int foo() { return Q2().f(); }