OpenCores
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] - Blame information for rev 823

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do run  }
2
#include 
3
#include 
4
#include 
5
#include 
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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.