Merge from mainline (165734:167278).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / 20090107-1.C
blobff586e8176743be18f5e7bbd1abf55133e4017e5
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() {
8     int k;
9     return k; /* { dg-warning "'k' is used uninitialized in this function" }  */
10   }
12 int foo() { return Q2<int>().f(); }