1 // { dg-do compile } 2 // { dg-require-effective-target c++11 } 3 // { dg-options "-O -Wuninitialized" } 4 5 struct A { 6 A (int); 7 }; 8 9 struct B: A { 10 const bool x = true; 11 BB12 B (): A (x ? 3 : 7) { } // { dg-warning "x. is used uninitialized" } 13 }; 14 15 void f (void*); g()16void g () 17 { 18 B b; 19 f (&b); 20 } 21