URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 301 |
Rev 384 |
// Bug: we were removing the p = q assignment in dce, and then reinserting
|
// Bug: we were removing the p = q assignment in dce, and then reinserting
|
// it *after* the try/catch in out-of-ssa. Oops.
|
// it *after* the try/catch in out-of-ssa. Oops.
|
|
|
// testcase reduced from libjava/interpret.cc.
|
// testcase reduced from libjava/interpret.cc.
|
|
|
// { dg-do run }
|
// { dg-do run }
|
// { dg-options "-O2" }
|
// { dg-options "-O2" }
|
|
|
extern "C" int printf (const char *, ...);
|
extern "C" int printf (const char *, ...);
|
|
|
bool b;
|
bool b;
|
|
|
int main()
|
int main()
|
{
|
{
|
__label__ one, two, done;
|
__label__ one, two, done;
|
void *labs[] = { &&one, &&two, &&done };
|
void *labs[] = { &&one, &&two, &&done };
|
const void **q = (const void **)labs;
|
const void **q = (const void **)labs;
|
const void **p = q;
|
const void **p = q;
|
|
|
try
|
try
|
{
|
{
|
one:
|
one:
|
printf ("one!\n");
|
printf ("one!\n");
|
if (b)
|
if (b)
|
throw 42;
|
throw 42;
|
goto **p++;
|
goto **p++;
|
|
|
two:
|
two:
|
printf ("two!\n");
|
printf ("two!\n");
|
goto **p++;
|
goto **p++;
|
|
|
done:
|
done:
|
printf ("done!\n");
|
printf ("done!\n");
|
}
|
}
|
catch (int)
|
catch (int)
|
{
|
{
|
printf ("caught!\n");
|
printf ("caught!\n");
|
}
|
}
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.