// { dg-do assemble } template struct S1 {}; struct S2 { template operator S1*(); }; struct D: public S1 { }; void f() { S2 s; (D*) s; // { dg-error "" } cannot convert }