1// Copyright (C) 2002 Free Software Foundation
2// Contributed by Roger Sayle <roger@eyesopen.com>
3// { dg-do compile }
4
5template <class A>
6class foo {
7   int _foo;
8public:
9   foo() {}
10protected:
11   ~foo() {} // { dg-error "~foo" }
12};
13
14int main()
15{
16  foo<int> a; // { dg-error "context" }
17}
18