1 /* { dg-do compile } */
2 /* { dg-require-effective-target lto } */
3 /* { dg-options "-flto -Wuninitialized -O1" } */
5 template <typename T> struct Q1 { typedef int x; };
6 template <typename T> struct Q2 {
7 typename Q1<T>::x f() {
9 return k; /* { dg-warning "'k' is used uninitialized in this function" } */
12 int foo() { return Q2<int>().f(); }