// Copyright (C) 2002 Free Software Foundation // Contributed by Roger Sayle // { dg-do compile } template class foo { int _foo; public: foo() {} protected: ~foo() {} // { dg-error "~foo" } }; int main() { foo a; // { dg-error "context" } }