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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [abi/] [vthunk1.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do link }
2
 
3
// Copyright (C) 2001 Free Software Foundation, Inc.
4
// Contributed by Nathan Sidwell 29 Jul 2001 
5
 
6
// Origin snyder@fnal.gov
7
// Bug 3631. We mis-calculated the non-virtual part of a virtual
8
// thunk. Leading to a link failure, in this case.
9
 
10
struct A { virtual ~A () {} };
11
 
12
struct B : virtual public A
13
{
14
  virtual void destroy() {}
15
};
16
 
17
class C : virtual public B {};
18
class D : virtual public C {};
19
class E : public virtual A {};
20
 
21
struct F : virtual public B, virtual public E
22
{
23
  virtual void destroy() = 0;
24
};
25
 
26
struct G : public virtual F
27
{
28
  virtual void destroy() {}
29
};
30
 
31
class H : virtual public C, virtual public F {};
32
class I : virtual public D, virtual public H {};
33
class J : public virtual G, public virtual H {};
34
 
35
class K : public virtual I, public virtual J
36
{
37
  public:
38
  virtual ~K();
39
};
40
K::~K() {}
41
 
42
int main ()
43
{
44
  return 0;
45
}

powered by: WebSVN 2.1.0

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