summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/lookup15.C
blob: 4d5ce70c2cd2853cd251ea8403c4d4b008bfbceb (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
// { dg-do assemble  }
// Origin: Benjamin Kosnik <bkoz@cygnus.com>

class b
{
  int j;
public:
  b(int a = 6): j(a) {}
  void imbue(int a) {++j;}
};

class d: public b
{
  int k;
public:
  d(int a = 7): b(a), k(a) {}
  void imbue(int a) {++k;}
};
  
//virtual public kills, public ok
class mostd: virtual public d
{
  int l;
public:
  mostd(int a = 9): d(a), l(a) {}
};

int main() {

  d dobj;
  dobj.imbue(5);

  mostd mobj;
  mobj.imbue(5);
  
  return 0;
}