1// { dg-do run } 2 3#include <new> 4#include <stddef.h> 5#include <stdio.h> 6 7void * operator new[](size_t, std::nothrow_t const &) throw() 8{ return NULL; } 9 10struct X { 11 struct Inner { ~Inner() {} }; 12 13 X() { 14 Inner * ic = new (std::nothrow) Inner[1]; // SegFault here 15 } 16}; 17 18int main() { 19 X table; 20} 21