summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/mi2.C
blob: 51d8d2fa520f07813d9fa882baa0eb45dbbce24c (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// { dg-do run  }
class A {
  char a;
public:
  A(char x) : a(x) { }
  virtual ~A() { }
};

class B : virtual public A {
  char b;
public:
  B(char x) : A('b'), b(x) { }
  ~B() { }
};

class C : virtual public A {
  char c;
public:
  C(char x) : A('c'), c(x) { }
  ~C() { }
};

class D : virtual public A, public B, public C {
  char d;
public:
  D(char x) : A('d'), B('d'), C('d'), d(x) { }
  ~D() { }
};

class E : virtual public A, public B, public C {
  char e;
public:
  E(char x) : A('e'), B('e'), C('e'), e(x) { }
  ~E() { }
};

class F : virtual public A, public D, public E {
  char f;
public:
  F(char x) : A('f'), D('f'), E('f'), f(x) { }
  ~F() { }
};

int main() {
  F f('x');
  return 0;
}