URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
// { dg-do run }
|
// { dg-do run }
|
// From: bruno@isoft.com.ar (Bruno R. Depascale)
|
// From: bruno@isoft.com.ar (Bruno R. Depascale)
|
// Subject: No destructor bug
|
// Subject: No destructor bug
|
// Date: Mon, 14 Feb 1994 12:49:45 -0300 (Arg)
|
// Date: Mon, 14 Feb 1994 12:49:45 -0300 (Arg)
|
|
|
// Bug: temporaries created with constructor notation aren't destroyed.
|
// Bug: temporaries created with constructor notation aren't destroyed.
|
|
|
int count = 0;
|
int count = 0;
|
|
|
class A {
|
class A {
|
public:
|
public:
|
A() { ++count; }
|
A() { ++count; }
|
~A() { --count; }
|
~A() { --count; }
|
};
|
};
|
|
|
int main()
|
int main()
|
{
|
{
|
A();
|
A();
|
return count;
|
return count;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.