PR c++/55137
[official-gcc.git] / gcc / testsuite / g++.dg / init / new5.C
blob0d99f93c6348af4e13f74927370116e2c55199ba
1 // { dg-do run }
3 #include <new>
4     
5 void * operator new[](std::size_t, std::nothrow_t const &) throw()
6 { return 0; }
8 struct X {
9     struct Inner { ~Inner() {} };
11     X() {
12       Inner * ic = new (std::nothrow) Inner[1]; // SegFault here
13     }
16 int main() {
17    X table;