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