Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.eh/unwind1.C

raw
1 // { dg-do run }
2 // Test that unwinding properly restores SP.
3 // Contributed by Jason Merrill <[email protected]>
4
5 void f (int i)
6 {
7 throw i;
8 }
9
10 int 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 }