1// { dg-do run } 2// It checks to see if you can define your own global new operator. 3// prms-id: 755 4 5#include <new> 6 7extern "C" void _exit(int); 8 9void* operator new(std::size_t sz) 10#if __cplusplus <= 199711L 11 throw (std::bad_alloc) 12#endif 13{ 14 void* p = 0; 15 _exit(0); 16 return p; 17} 18 19int main () { 20 int* i = new int; 21 delete i; 22 return 1; 23} 24