// Copyright (C) 2002 Free Software Foundation// Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net>structA{virtualvoidf(constA*a)=0;};structB:virtualA{virtualvoidf(constA*a);};voidB::f(constA*a){static_cast<constB&>(*a);// { dg-error "" }}