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/] [p755.C] - Rev 414
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do run }
// It checks to see if you can define your own global new operator.
// prms-id: 755
#include <new>
extern "C" void _exit(int);
void* operator new(size_t sz) throw (std::bad_alloc) {
void* p = 0;
_exit(0);
return p;
}
int main () {
int* i = new int;
delete i;
return 1;
}
Go to most recent revision | Compare with Previous | Blame | View Log