1 // { dg-do run { xfail sparc64-*-elf arm-*-pe } } 2 // { dg-options "-fexceptions" } 3 4 class foo { 5 public: 6 class error {}; 7 cause_error(void)8 void cause_error(void) { throw "Hello World!"; } 9 }; 10 main(void)11int main(void) 12 { 13 foo f; 14 try { 15 f.cause_error(); 16 } 17 catch (const char cp[]) { 18 return 0; 19 } 20 return 1; 21 } 22