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