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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [init/] [placement2.C] - Blame information for rev 316

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

Line No. Rev Author Line
1 301 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.