1 // PR c++/94041 2 // { dg-do run { target c++11 } } 3 4 bool gone; ~TempTemp5struct Temp { ~Temp() { gone = true; } }; AA6struct A{ A() {}; A(const Temp&) noexcept {}; }; ~BB7struct B{ ~B() {}; }; 8 struct Pair{ A a; B b; }; 9 foo(const Pair &)10void foo(const Pair&) noexcept { if (gone) __builtin_abort(); } 11 main()12int main() 13 { 14 foo({A(Temp{}), B()}); 15 if (!gone) __builtin_abort (); 16 } 17