1 // { dg-do run { xfail sparc64-*-elf arm-*-pe } } 2 // { dg-options "-fexceptions" } 3 4 extern "C" int printf(const char *, ...); 5 6 void main1() { 7 throw 1; 8 } 9 10 11 int main() { 12 try { 13 int main1(); 14 } catch (...) { 15 printf("Unwind works!\n"); 16 return 0; 17 } 18 return 1; 19 } 20