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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do run  }
2
// prms-id: 3041
3
 
4
class A {
5
public:
6
  A() { }
7
  virtual void a() = 0;
8
  static int b(A * p) {
9
    p->a();
10
    return 1;
11
  }
12
};
13
 
14
class B : virtual public A {
15
public:
16
  B() {
17
    static int installed = b(this);
18
  }
19
  void a() { }
20
};
21
 
22
class C : virtual public B {
23
public:
24
  C() {
25
    static int installed = b(this);
26
  }
27
  void a() { }
28
};
29
 
30
int main()
31
{
32
  C c;
33
  return 0;
34
}

powered by: WebSVN 2.1.0

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