1 // { dg-do run } 2 // PRMS Id: 5184 3 // Bug: cast to C& below does not adjust address 4 5 struct A {}; 6 struct B { fooB7 virtual void foo () {} 8 }; 9 struct C : public B, public A {}; 10 main()11int main() { 12 C c; 13 14 A& ar = c; 15 C& cr = (C&)ar; 16 17 cr.foo(); // this line causes core dump 18 } 19