// PR c++/51328 template struct A { void foo(A); // { dg-error "invalid use of destructor" } };