1 // PR c++/44127
2 
3 // This is basically the same test as g++.eh/terminate1.C, but that one
4 // tests runtime behavior and this tests the assembly output.  The test
5 // should call terminate (because initializing the catch parm throws), but
6 // from the personality routine, not directly.
7 
8 // { dg-final { scan-assembler-not "_ZSt9terminatev" } }
9 
10 // Also there should only be two EH call sites: #0 for throw A() and #1 for
11 // _Unwind_Resume.  We don't want call site info for __cxa_end_catch, since
12 // ~A is trivial.
13 
14 // { dg-final { scan-assembler-not "LEHB2" } }
15 
16 struct A
17 {
AA18   A() { }
AA19   A (const A&) { throw 1; }
20 };
21 
main()22 int main()
23 {
24   try
25     {
26       throw A();
27     }
28   catch (A) { }
29 }
30