Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.old-deja / g++.mike / net46.C
blob174022852a3a6a60c187f7c40d7a456a175e7f5a
1 // { dg-do run  }
2 #include <iostream>
3 #include <cstdlib>
4 #include <cstddef>
5 #include <new>
7 int fail = 1;
9 int in_main = 0;
11 void *operator new(size_t size) throw (std::bad_alloc) {
12   if (!in_main) return malloc (size);
13   --fail;
14   return (void*) 0;
17 int main() {
18   std::cout << "";
19   in_main = 1;
20   new int;
21   return fail;