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
Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git]
/
old-autovect-branch
/
gcc
/
testsuite
/
g++.old-deja
/
g++.mike
/
net46.C
blob
174022852a3a6a60c187f7c40d7a456a175e7f5a
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
}