1 // { dg-do run } 2 // prms-id: 4511 3 4 int bad; 5 6 class A { 7 public: dummy()8 virtual void dummy (){}; 9 }; 10 11 class B { 12 public: 13 virtual void f(void) = 0; 14 }; 15 16 class C : public A, public B { 17 public: f(void)18 void f(void) { bad=1; }; 19 }; 20 21 class D : public C { 22 public: f(void)23 void f(void) { }; 24 }; 25 26 class E : public D { }; 27 main()28int main() { 29 E e; 30 e.f(); 31 E * ep = &e; 32 ep->f(); 33 return bad; 34 } 35