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