repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Dead
[official-gcc.git]
/
gomp-20050608-branch
/
gcc
/
testsuite
/
g++.old-deja
/
g++.brendan
/
new3.C
blob
b5bfb4a83b059d89ea253a483e579519cb58d517
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>
7
8
int pass = 0;
9
10
void *operator new(size_t sz) throw (std::bad_alloc) {
11
12
void *p;
13
14
pass = 1;
15
p = malloc(sz);
16
return p;
17
}
18
19
class A {
20
public:
21
A() {}
22
~A() {}
23
24
int a;
25
int b;
26
};
27
28
29
int main()
30
{
31
A *bb = new A[10];
32
delete [] bb;
33
34
if (pass)
35
printf ("PASS\n");
36
else
37
{ printf ("FAIL\n"); return 1; }
38
}