PR c++/86728 - C variadic generic lambda.
[official-gcc.git] / gcc / testsuite / g++.dg / init / new11.C
bloba13f262aa64ab75674837fadf96ed6932e3cbed1
1 // PR c++/17670
2 // { dg-do run }
4 #include <cstdlib>
5 #include <new>
7 bool abort_new;
8 void *operator new[](size_t bytes)
9 #if __cplusplus <= 199711L
10   throw (std::bad_alloc)
11 #endif
13   if (abort_new)
14     abort(); 
15   return operator new (bytes);
19 struct X {};  
20 int main () {
21   // Do not abort until main is running in case startup code uses
22   // operator new[].
23   abort_new = true;
24   new (X);