URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [leak1.C] - Rev 414
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do run }
int count = 0;
class T {
int i;
public:
T() {
i = 1;
++count;
}
T(const T& o) {
i = o.i;
++count;
}
T operator +(const T& o) {
T r;
r.i = this->i + o.i;
return r;
}
operator int () {
return i;
}
~T() {
--count;
}
} s, b;
void bar() {
static int j = int(s+b);
int i = int(s+b);
}
int i = int(s+b);
int main() {
bar();
bar();
return count != 2;
}
Go to most recent revision | Compare with Previous | Blame | View Log