URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
// PR 14535
|
// PR 14535
|
// { dg-do run }
|
// { dg-do run }
|
// { dg-options "-O -finline" }
|
// { dg-options "-O -finline" }
|
//
|
//
|
// Original test case failure required that Raiser constructor be inlined.
|
// Original test case failure required that Raiser constructor be inlined.
|
|
|
extern "C" void abort();
|
extern "C" void abort();
|
bool destructor_called = false;
|
bool destructor_called = false;
|
|
|
struct B {
|
struct B {
|
virtual void Run(){};
|
virtual void Run(){};
|
};
|
};
|
|
|
struct D : public B {
|
struct D : public B {
|
virtual void Run()
|
virtual void Run()
|
{
|
{
|
struct O {
|
struct O {
|
~O() { destructor_called = true; };
|
~O() { destructor_called = true; };
|
} o;
|
} o;
|
|
|
struct Raiser {
|
struct Raiser {
|
Raiser() throw( int ) {throw 1;};
|
Raiser() throw( int ) {throw 1;};
|
} raiser;
|
} raiser;
|
};
|
};
|
};
|
};
|
|
|
int main() {
|
int main() {
|
try {
|
try {
|
D d;
|
D d;
|
static_cast(d).Run();
|
static_cast(d).Run();
|
} catch (...) {}
|
} catch (...) {}
|
|
|
if (!destructor_called)
|
if (!destructor_called)
|
abort ();
|
abort ();
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.