Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / g++.old-deja / g++.brendan / new3.C
blobb5bfb4a83b059d89ea253a483e579519cb58d517
1 // { dg-do run { xfail powerpc-ibm-aix* } }
2 // { dg-options "-flat_namespace" { target *-*-darwin[67]* } }
3 // GROUPS passed operator-new
4 #include <stdio.h>
5 #include <stdlib.h>
6 #include <new>
8 int pass = 0;
10 void *operator new(size_t sz) throw (std::bad_alloc) {
12   void *p;
14   pass = 1;
15   p = malloc(sz);
16   return p;
19 class A {
20 public:
21   A() {}
22   ~A() {}
24   int a;
25   int b;
29 int main()
31   A *bb = new A[10];
32   delete [] bb;
34   if (pass)
35     printf ("PASS\n");
36   else
37     { printf ("FAIL\n"); return 1; }