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
Index: cp/ChangeLog
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.mike
/
net46.C
1
// { dg-do run }
2
#include <iostream>
3
#include <cstdlib>
4
#include <cstddef>
5
#include <new>
6
7
int fail = 1;
8
9
int in_main = 0;
10
11
void *operator new(size_t size) throw (std::bad_alloc) {
12
if (!in_main) return malloc (size);
13
--fail;
14
return (void*) 0;
15
}
16
17
int main() {
18
std::cout << "";
19
in_main = 1;
20
new int;
21
return fail;
22
}