summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/p4511.C
blob: 25348f4635f2d71bb364d09b7355eae4c3b901ca (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
// { dg-do run  }
// prms-id: 4511

int bad;

class A {
public:
  virtual void dummy (){}
};

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

class C : public A, public B {
public:
  void f(void) { bad=1; }
};

class D : public C {
public:
  void f(void) { }
};

class E : public D { };

int main() {
  E e;
  e.f();
  E * ep = &e;
  ep->f();
  return bad;
}