* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / new6.C
blob7013337b21be599dd9dad13d0db8a8152efd67a3
1 // { dg-do run  }
2 // Test that we properly default-initialize the new int when () is given.
4 #include <new>
5 using namespace std;
6 extern "C" void *malloc (size_t);
8 int special;
9 int space = 0xdeadbeef;
11 void *operator new (size_t size)
12 #if __cplusplus <= 199711L
13   throw (std::bad_alloc)
14 #endif
16   if (special)
17     return &space;
18   return malloc (size);
21 int main ()
23   special = 1;
24   int *p = new int();
25   special = 0;
26   return *p != 0;