Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.old-deja / g++.other / pmf4.C
blobcefb3616c67c9502a38b3694ace72ce579740d0e
1 // { dg-do run  }
2 // Bug: g++ doesn't compensate for finding a virtual function in a
3 // non-primary vtable when generating PMFs.
4 // Submitted by Jason Merrill <jason@cygnus.com>
6 struct A {
7   virtual ~A() {}
8 };
10 struct B {
11   virtual void f () = 0;
14 struct C : public A, public B {
15   void f ();
18 void (C::* B_f)() = &B::f;      // this works
19 void (C::* C_f)() = &C::f;      // this breaks
21 C* p;
23 void C::f ()
25   p = this;
28 int main()
30   C c;
32   (c.*B_f)();
33   if (p != &c)
34     return 1;
36   (c.*C_f)();
37   if (p != &c)
38     return 1;