URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [delete6.C] - Rev 154
Compare with Previous | Blame | View Log
// { dg-do run }
// Origin: Alexander Schiemann (aschiem@count.math.uni-sb.de)
typedef __SIZE_TYPE__ size_t;
int i;
struct B{};
struct A{
static void* operator new(size_t)
{return &i;}
inline static void operator delete(void*p);
static void operator delete(void*, const B&){}
};
inline void A::operator delete(void*p)
{A::operator delete(p,B());}
int main()
{A *ap=new A;
delete ap;}