http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00110.html
[official-gcc.git] / gcc / testsuite / g++.dg / init / new5.C
blob3a5981e075cae68d684298e9331ef5115ae29458
1 // { dg-do run }
3 #include <new>
4     
5 void * operator new[](size_t, std::nothrow_t const &) throw()
6 { return NULL; }
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;