OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [init/] [placement2.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
// Bug: We were calling f() twice, for both the placement new and placement
2
// delete calls.
3
 
4
// { dg-do run }
5
 
6
void* operator new    (__SIZE_TYPE__ sz, void*) { return operator new (sz); }
7
void  operator delete (void* p, void*)         { operator delete (p); }
8
 
9
struct A { A() { throw 1; } };
10
 
11
int c;
12
void *f() { ++c; return 0; }
13
 
14
int main()
15
{
16
  try
17
    {
18
      new (f()) A;
19
    }
20
  catch (...) {}
21
  return c != 1;
22
}

powered by: WebSVN 2.1.0

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