// PR c++/58843 struct A {}; template void foo(T t) { t.T::~X(); // { dg-error "no type" } } void bar() { foo(A()); }