Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.old-deja / g++.other / virtual8.C
blobf1ec9ada622e1a1f26619d7f855f8a71de0c8687
1 // { dg-do run  }
2 extern "C" int printf (const char*, ...);
4 struct A
6   virtual void f () {
7     printf ("%x\n", this);
8   }
9 };
11 struct B : public A
15 struct C : public A
19 struct D : virtual public B, public C
23 int main ()
25   D d;
27   A* a1 = (A*) (B*) &d;
28   A* a2 = (A*) (C*) &d;
30   a1->f ();
31   a2->f ();