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 |
// PR c++/9993
|
// PR c++/9993
|
// Bug: We were failing to destroy b.
|
// Bug: We were failing to destroy b.
|
|
|
// { dg-do run }
|
// { dg-do run }
|
|
|
int c, d;
|
int c, d;
|
|
|
struct Object {
|
struct Object {
|
Object() { ++c; }
|
Object() { ++c; }
|
Object(const Object&) { ++c; }
|
Object(const Object&) { ++c; }
|
~Object() { ++d; }
|
~Object() { ++d; }
|
};
|
};
|
|
|
Object function() {
|
Object function() {
|
int i = 0;
|
int i = 0;
|
do {
|
do {
|
Object b;
|
Object b;
|
if (i++ == 2)
|
if (i++ == 2)
|
return b;
|
return b;
|
} while (1);
|
} while (1);
|
}
|
}
|
|
|
int main() {
|
int main() {
|
function();
|
function();
|
return c != d;
|
return c != d;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.