new
From-SVN: r26067
This commit is contained in:
parent
51980de69e
commit
85a0b07565
1 changed files with 24 additions and 0 deletions
24
gcc/testsuite/g++.old-deja/g++.eh/unwind1.C
Normal file
24
gcc/testsuite/g++.old-deja/g++.eh/unwind1.C
Normal file
|
@ -0,0 +1,24 @@
|
|||
// Test that unwinding properly restores SP.
|
||||
// Contributed by Jason Merrill <jason@cygnus.com>
|
||||
|
||||
int f (int i)
|
||||
{
|
||||
throw i;
|
||||
}
|
||||
|
||||
int main ()
|
||||
{
|
||||
void *sp1 = __builtin_alloca (0);
|
||||
|
||||
try
|
||||
{
|
||||
f (0);
|
||||
}
|
||||
catch (int)
|
||||
{
|
||||
}
|
||||
|
||||
void *sp2 = __builtin_alloca (0);
|
||||
|
||||
return (sp1 != sp2);
|
||||
}
|
Loading…
Add table
Reference in a new issue