2 // { dg-final { scan-assembler-not "__cxa_get_exception" } }
3 // { dg-options "-fno-use-cxa-get-exception-ptr" }
14 static Check const data[] = {
15 { 0, 0, false }, // construct [0]
16 { 1, 0, true }, // [1] = [0]
17 { 0, 0, true }, // destruct [0]
18 { 2, 1, true }, // [2] = [1]
19 { 2, 2, true }, // destruct [2]
20 { 3, 1, true }, // [3] = [1]
21 { 3, 3, false }, // destruct [3]
22 { 1, 1, false }, // destruct [1]
23 { 9, 9, false } // end-of-data
28 static void test(int obj1, int obj2, bool state)
30 if (obj1 != data[pos].obj1) abort ();
31 if (obj2 != data[pos].obj2) abort ();
32 if (state != data[pos].state) abort ();
44 static int next_id = 0;
49 test (id, id, std::uncaught_exception ());
55 test (id, x.id, std::uncaught_exception ());
60 test (id, id, std::uncaught_exception ());
63 extern void foo (S *);
72 throw s0; // s1 is the exception object