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
Clean up some minor white space issues in trans-decl.c and trans-expr.c
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
torture
/
pr33340.C
blob
bac882156b552b0d25a35268c4a52a8fca7acfa5
1
void* operator new(__SIZE_TYPE__, void* __p) { }
2
3
struct auto_ptr {
4
int* p;
5
~auto_ptr() { delete p; }
6
};
7
8
typedef void* T;
9
struct vector {
10
void push_back(const T& __x) {
11
::new(0) T(__x);
12
insert(__x);
13
}
14
void insert(const T& __x);
15
} v;
16
17
void g();
18
void f() {
19
auto_ptr ap;
20
if (ap.p) {
21
ap.p = new int();
22
}
23
g();
24
int* tmp = ap.p;
25
ap.p = 0;
26
v.push_back(tmp);
27
}