PR lto/84212 - -Wno-* does not disable warnings from -flto link stage
[official-gcc.git] / gcc / testsuite / g++.dg / warn / Wuninitialized-9.C
blob3432b4f337fd53a87380e77324460c9466802ab5
1 // PR c++/80119
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-Wuninitialized" }
5 #include <type_traits>
7 template <bool b>
8 void failing_function(std::integral_constant<bool, b>)
10    int i;
11    if (b && (i = 4)) {
12       ++i; // { dg-bogus "may be used uninitialized" }
13    }
16 int main (void)
18    failing_function(std::false_type());