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++.jason/] [vecdel.C] - Rev 165
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do run }
__SIZE_TYPE__ newsize = 0;
__SIZE_TYPE__ delsize = 0;
struct A {
int i;
void * operator new [] (__SIZE_TYPE__ i)
{ newsize = i; return ::operator new [](i); }
void operator delete [] (void *p, __SIZE_TYPE__ i)
{ delsize = i; ::operator delete [](p); }
};
int main()
{
A* ap = new A [2];
delete [] ap;
if (!newsize || newsize != delsize)
return 1;
return 0;
}
Go to most recent revision | Compare with Previous | Blame | View Log