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