// PR c++/19808 // { dg-do compile { target c++11 } } // { dg-options "-Wuninitialized" } // Test that we don't warn in an uninstantiated template. struct A { int *fn() { return nullptr; } }; template struct B { B() : p(a->fn()) { } A *a; int *p; }; template struct C { C() : p(a->fn()) { } // { dg-warning "member .C::a. is used uninitialized" } A *a; int *p; }; C c;