URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [init/] [byval1.C] - Rev 801
Go to most recent revision | Compare with Previous | Blame | View Log
// PR c++/3948
// Test that the destructor call for a value parameter gets the
// right address.
// { dg-do run }
void *p[2];
int i;
int r;
struct C
{
int m;
C() { p[i++] = this; }
~C() { if (p[--i] != this) r = 1; }
};
void Foo (C c)
{
p[i++] = &c;
}
int main ()
{
C c;
Foo (c);
return r;
}
Go to most recent revision | Compare with Previous | Blame | View Log