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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [thunk1.C] - Blame information for rev 699

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do run  }
2
extern "C" void abort();
3
 
4
int ic;
5
 
6
struct X
7
{
8
  X() { ++ic; }
9
  X( const X & ) { ++ic; }
10
 ~X() { if (--ic < 0) abort(); }
11
};
12
 
13
struct V
14
{
15
  virtual ~V() {}
16
};
17
 
18
struct A : public virtual V
19
{
20
};
21
 
22
struct B : public virtual V
23
{
24
  virtual void foo( X ) = 0;
25
};
26
 
27
struct D : public A, public virtual B
28
{
29
  virtual void foo( X ) {}
30
};
31
 
32
int main()
33
{
34
  B *b = new D;
35
  b->foo( X() );
36
}

powered by: WebSVN 2.1.0

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