1 // Copyright (C) 2002 Free Software Foundation 2 // Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net> 3 4 struct A { 5 virtual void f(const A* a) = 0; 6 }; 7 8 struct B : virtual A { 9 virtual void f(const A* a); 10 }; 11 f(const A * a)12void B::f(const A* a) 13 { 14 static_cast<const B&>(*a); // { dg-error "" } 15 } 16