struct Foo { template ~Foo() {} // { dg-error "5:destructor .Foo::~Foo\\\(\\\)." } }; int main() { Foo f; }