URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 301 |
Rev 338 |
extern "C" void abort ();
|
extern "C" void abort ();
|
|
|
static int count;
|
static int count;
|
|
|
struct S {
|
struct S {
|
S() { ++count; }
|
S() { ++count; }
|
~S() { --count; }
|
~S() { --count; }
|
};
|
};
|
|
|
int foo(int p)
|
int foo(int p)
|
{
|
{
|
S s1;
|
S s1;
|
{
|
{
|
S s2;
|
S s2;
|
if (p)
|
if (p)
|
goto L;
|
goto L;
|
else
|
else
|
return 1;
|
return 1;
|
}
|
}
|
foo (p);
|
foo (p);
|
L:
|
L:
|
return 0;
|
return 0;
|
}
|
}
|
|
|
int main()
|
int main()
|
{
|
{
|
foo(0);
|
foo(0);
|
if (count != 0)
|
if (count != 0)
|
abort ();
|
abort ();
|
foo(1);
|
foo(1);
|
if (count != 0)
|
if (count != 0)
|
abort ();
|
abort ();
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.