blob: 3979e721584740ff59b3d9a29c30040ea03d2bb1 [file] [log] [blame]
// { dg-do run }
// It checks to see if you can define your own global new operator.
// prms-id: 755
#include <stddef.h>
#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;
}