URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 154 |
Rev 816 |
// PR c++/13944
|
// PR c++/13944
|
|
|
// Bug: When eliding the copy from the A temporary into the exception
|
// Bug: When eliding the copy from the A temporary into the exception
|
// object, we extended the throw prohibition to the constructor for the
|
// object, we extended the throw prohibition to the constructor for the
|
// temporary. This is wrong; the throw from A() should propagate normally
|
// temporary. This is wrong; the throw from A() should propagate normally
|
// regardless of the elision of the temporary.
|
// regardless of the elision of the temporary.
|
|
|
// { dg-do run }
|
// { dg-do run }
|
|
|
struct A
|
struct A
|
{
|
{
|
A() { throw 0; }
|
A() { throw 0; }
|
};
|
};
|
|
|
int main()
|
int main()
|
{
|
{
|
try
|
try
|
{
|
{
|
throw A();
|
throw A();
|
}
|
}
|
catch(int i)
|
catch(int i)
|
{
|
{
|
return i;
|
return i;
|
}
|
}
|
catch (...)
|
catch (...)
|
{
|
{
|
return 2;
|
return 2;
|
}
|
}
|
return 3;
|
return 3;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.