1// { dg-do run { xfail sparc64-*-elf arm-*-pe } } 2// { dg-options "-fexceptions" } 3 4int fail = 1; 5class B { 6public: 7 B() { throw 1; } 8}; 9class D : public B { 10public: 11 D() try : B() { 12 fail = 1; 13 } catch (char c) { 14 fail = 1; 15 throw; 16 } catch (...) { 17 fail = 0; 18 throw; 19 } 20}; 21 22main() { 23 try { 24 D d; 25 fail = 1; 26 } catch (...) { 27 } 28 return fail; 29} 30