URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 305 |
Rev 338 |
// { dg-do assemble }
|
// { dg-do assemble }
|
// { dg-options "-fexceptions" }
|
// { dg-options "-fexceptions" }
|
// GROUPS passed exceptions
|
// GROUPS passed exceptions
|
// except file
|
// except file
|
// From: GUSTAVO%DRAGON@orion.cpqd.ansp.br
|
// From: GUSTAVO%DRAGON@orion.cpqd.ansp.br
|
// Date: 15 Dec 1993 09:33:30 +0000 (C)
|
// Date: 15 Dec 1993 09:33:30 +0000 (C)
|
// Subject: exception handling problem
|
// Subject: exception handling problem
|
// Message-ID: <01H6I5GEAF5UPBJ0UV@VENUS.CPQD.ANSP.BR>
|
// Message-ID: <01H6I5GEAF5UPBJ0UV@VENUS.CPQD.ANSP.BR>
|
|
|
struct Exception
|
struct Exception
|
{
|
{
|
int v;
|
int v;
|
Exception(int i) { v = i; };
|
Exception(int i) { v = i; };
|
};
|
};
|
|
|
void inc(int &i)
|
void inc(int &i)
|
{
|
{
|
try {
|
try {
|
if (i == 0)
|
if (i == 0)
|
throw Exception(i);
|
throw Exception(i);
|
else
|
else
|
i++;
|
i++;
|
}
|
}
|
catch (Exception v) {
|
catch (Exception v) {
|
i = v.v;
|
i = v.v;
|
}
|
}
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.