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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [init/] [placement4.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
// PR c++/34158
2
 
3
typedef __SIZE_TYPE__ size_t;
4
extern "C" void* malloc (size_t);
5
extern "C" void free (void *);
6
 
7
template  class undef;
8
 
9
struct A {
10
  A() { throw 1; }
11
};
12
 
13
template class Pool { };
14
 
15
void *operator new(size_t size,Pool& pool)
16
{
17
  return malloc(size);
18
}
19
 
20
template
21
void operator delete(void *p,Pool& pool)
22
{
23
  undef t;                      // { dg-error "incomplete" }
24
  free(p);
25
}
26
 
27
int main ()
28
{
29
  Pool pool;
30
  new (pool) A();               // { dg-message "required" }
31
  return 0;
32
}

powered by: WebSVN 2.1.0

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