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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 693 jeremybenn
 // { dg-do run }
2
 
3
struct Spec
4
 
5
{
6
 virtual int id () const = 0;
7
};
8
class D1_1_Spec :  public virtual Spec { };
9
class D1_2_Spec :  public virtual Spec { };
10
class D1_3_Spec :  public virtual Spec { };
11
class D2_1_Spec : public D1_1_Spec, public D1_2_Spec { };
12
class D2_Spec : public virtual D2_1_Spec, public virtual D1_3_Spec { };
13
 
14
struct D3_Spec : public D2_Spec
15
{
16
 virtual int id () const { return 3; }
17
 
18
};
19
 
20
__attribute__((noinline)) void foo(D3_Spec* spec)
21
{
22
  spec->id();
23
}
24
 
25
int main()
26
{
27
 D3_Spec spec;
28
 foo(&spec);
29
 return 0;
30
}

powered by: WebSVN 2.1.0

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