// PR c++/93922 // { dg-do link { target c++11 } } template struct A { A () {} template A (A const &) {} ~A () {} }; int t; struct B {}; struct C : B { C (B const &) { if (t) throw 1; } }; struct S { A x; C y; }; A bar (B *) { return A (); } S * foo (B *x, B const &y) { return new S {bar (x), y}; } int main () { }