1 // { dg-do run } 2 // Test that unwinding properly restores SP. 3 // Contributed by Jason Merrill <jason (at) cygnus.com> 4 5 void f (int i) 6 { 7 throw i; 8 } 9 10 int main () 11 { 12 void *sp1 = __builtin_frame_address (0); 13 14 try 15 { 16 f (0); 17 } 18 catch (int) 19 { 20 } 21 22 void *sp2 = __builtin_frame_address (0); 23 24 return (sp1 != sp2); 25 } 26