repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.eh
/
unwind1.C
blob
076b550f41706ca2502097e2e4065d167f94b402
1
// { dg-do run }
2
// Test that unwinding properly restores SP.
3
// Contributed by Jason Merrill <jason@cygnus.com>
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
}