URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 305 |
Rev 338 |
// { dg-do run }
|
// { dg-do run }
|
// prms-id: 9732
|
// prms-id: 9732
|
|
|
int count;
|
int count;
|
int bail = 0;
|
int bail = 0;
|
|
|
extern "C" void abort (void);
|
extern "C" void abort (void);
|
extern "C" void _exit (int);
|
extern "C" void _exit (int);
|
|
|
|
|
struct base {
|
struct base {
|
base () { ++count; }
|
base () { ++count; }
|
~base () { --count; }
|
~base () { --count; }
|
base(const base&o) { ++count; }
|
base(const base&o) { ++count; }
|
};
|
};
|
|
|
class D {
|
class D {
|
public:
|
public:
|
~D() {
|
~D() {
|
if (bail++)
|
if (bail++)
|
{
|
{
|
// On some Linux boxes, we run the dtor for d twice,
|
// On some Linux boxes, we run the dtor for d twice,
|
// once before exit, and once after!
|
// once before exit, and once after!
|
abort ();
|
abort ();
|
}
|
}
|
else
|
else
|
{
|
{
|
if (count != 0)
|
if (count != 0)
|
_exit (1);
|
_exit (1);
|
_exit (0);
|
_exit (0);
|
}
|
}
|
}
|
}
|
} d;
|
} d;
|
|
|
base base_object;
|
base base_object;
|
|
|
base base_returning_function ();
|
base base_returning_function ();
|
|
|
const base& base_ref = base_returning_function ();
|
const base& base_ref = base_returning_function ();
|
|
|
int main () {
|
int main () {
|
}
|
}
|
|
|
base base_returning_function () {
|
base base_returning_function () {
|
base local_base_object;
|
base local_base_object;
|
return local_base_object;
|
return local_base_object;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.