1// { dg-do compile } 2/* { dg-require-profiling "-fprofile-generate" } */ 3// { dg-options "-fprofile-generate" } 4 5// GCC used to ICE with some EH edge missing. 6 7inline void* operator new(__SIZE_TYPE__, void* p) throw() { return p; } 8inline void operator delete (void*, void*) throw() { } 9 10template<typename T> void foo(void* p, T t) 11{ 12 new(p) T(t); 13} 14 15void bar(); 16 17template<typename T> struct A 18{ 19 T* p; 20 21 A() { try { foo(p, T()); } catch(...) {} } 22 23 A(const A&) { try { bar(); } catch(...) { throw; } } 24}; 25 26A<A<int> > a; 27 28