summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/virt4.C
blob: 2d8b042632ad30b33a472b087d2c82cf79408d2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// { dg-do run  }
// { dg-options "" }

void  Foo () {}

class B {
public:
  virtual void foo() = 0;
};

class D: virtual public B {
public:
  void foo() { Foo(); }
};

class D1: public D {};

class D2: public D {};

class D1_2: public D1, public D2 {
public:
  void foo() { D1::foo(); D2::foo(); }
};

main() {
  D1_2 h;
  h.foo();
}