repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
No empty .Rs/.Re
[netbsd-mini2440.git]
/
gnu
/
dist
/
gcc4
/
gcc
/
testsuite
/
g++.dg
/
init
/
new11.C
blob
bf06aa4e7578ffd694b96eae5411b5acea4b044f
1
// PR c++/17670
2
// { dg-do run }
3
4
#include <cstdlib>
5
#include <new>
6
7
bool abort_new;
8
void *operator new[](size_t bytes) throw (std::bad_alloc) {
9
if (abort_new)
10
abort();
11
return operator new (bytes);
12
}
13
14
15
struct X {};
16
int main () {
17
// Do not abort until main is running in case startup code uses
18
// operator new[].
19
abort_new = true;
20
new (X);
21
}