// PR c++/95508 // { dg-do compile } template struct A; template struct B { operator int () { return 0; } }; template <> struct A : B {}; struct D { template int foo () { return e[f]; } int e[6]; A f; };