URL
https://opencores.org/ocsvn/scarts/scarts/trunk
Subversion Repositories scarts
[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.eh/] [unwind1.C] - Rev 12
Compare with Previous | Blame | View Log
// { dg-do run }
// Test that unwinding properly restores SP.
// Contributed by Jason Merrill <jason@cygnus.com>
void 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);
}