2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.eh / unwind1.C
blob076b550f41706ca2502097e2e4065d167f94b402
1 // { dg-do run  }
2 // Test that unwinding properly restores SP.
3 // Contributed by Jason Merrill <jason@cygnus.com>
5 void f (int i)
7   throw i;
10 int main ()
11 {  
12   void *sp1 = __builtin_alloca (0);
14   try
15     {
16       f (0);
17     }
18   catch (int)
19     {
20     }
22   void *sp2 = __builtin_alloca (0);
24   return (sp1 != sp2);