// PR c++/34158 typedef __SIZE_TYPE__ size_t; extern "C" void* malloc (size_t); extern "C" void free (void *); template class undef; struct A { A() { throw 1; } }; template class Pool { }; void *operator new(size_t size,Pool& pool) { return malloc(size); } template void operator delete(void *p,Pool& pool) { undef t; // { dg-error "incomplete" } free(p); } int main () { Pool pool; new (pool) A(); // { dg-message "required" } return 0; }