1 // ehopt was only copying one statement from the cleanup of the B temporary
2 // into the following try block, so we lost its destructor call.
6 template <class T, class U>
16 A(int) { ++count; if (b) throw 1; }
17 A(const A&) { ++count; if (b) throw 1; }
19 #if __cplusplus <= 201402L
20 throw(int) // { dg-warning "deprecated" "" { target { c++11 && { ! c++17 } } } }
24 { --count; if (b) throw 1; }
27 typedef A<int, int> B;
30 class A<void *, void *>
33 A() { if (b) throw 1; }
34 A(const B&) { if (b) throw 1; }
36 #if __cplusplus <= 201402L
37 throw(int) // { dg-warning "deprecated" "" { target { c++11 && { ! c++17 } } } }
44 typedef A<void *, void *> C;
46 void f() { if (b) throw 1; }