OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
PR c++/29175
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.dg
/
init
/
placement3.C
1
typedef __SIZE_TYPE__ size_t;
2
extern "C" void *malloc (size_t);
3
4
int i;
5
6
struct S {
7
S(int) {
8
throw 3;
9
}
10
11
void *operator new(size_t s, int) {
12
++i;
13
return malloc (s);
14
}
15
16
void operator delete(void *, int) {
17
--i;
18
}
19
20
void operator delete(void *, int, int) ;
21
};
22
23
int main () {
24
try {
25
new (7) S (12);
26
} catch (int) {
27
if (i)
28
return 1;
29
}
30
}