URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [net46.C] - Rev 841
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do run }
#include <iostream>
#include <cstdlib>
#include <cstddef>
#include <new>
int fail = 1;
int in_main = 0;
void *operator new(size_t size) throw (std::bad_alloc) {
if (!in_main) return malloc (size);
--fail;
return (void*) 0;
}
int main() {
std::cout << "";
in_main = 1;
new int;
return fail;
}
Go to most recent revision | Compare with Previous | Blame | View Log