3 // { dg-options "-Wno-deprecated" }
4 // { dg-options "-fuse-cxa-get-exception-ptr -Wno-deprecated" { target powerpc*-*-darwin* } }
15 static Check const data[] = {
16 { 0, 0, false }, // construct [0]
17 { 1, 0, false }, // [1] = [0]
18 { 0, 0, true }, // destruct [0]
19 { 2, 1, true }, // [2] = [1]
20 { 2, 2, true }, // destruct [2]
21 { 3, 1, true }, // [3] = [1]
22 { 3, 3, false }, // destruct [3]
23 { 1, 1, false }, // destruct [1]
24 { 9, 9, false } // end-of-data
29 static void test(int obj1, int obj2, bool state)
31 if (obj1 != data[pos].obj1) abort ();
32 if (obj2 != data[pos].obj2) abort ();
33 if (state != data[pos].state) abort ();
45 static int next_id = 0;
50 test (id, id, std::uncaught_exception ());
56 test (id, x.id, std::uncaught_exception ());
61 test (id, id, std::uncaught_exception ());
64 extern void foo (S *);
73 throw s0; // s1 is the exception object