1// { dg-do assemble  }
2// Copyright (C) 2000 Free Software Foundation, Inc.
3// Contributed by Nathan Sidwell 4 Oct 2000 <nathan@codesourcery.com>
4// Origin: bug 511 malte.starostik@t-online.de
5
6// Bug 511. We failed to set access correctly for enumeration members of
7// template classes
8
9template <class>
10class A
11{
12  public:
13  enum foo {bar};
14  typedef int baz;
15};
16
17struct C: public A<int>
18{
19  void choke (foo);
20  void choke (baz);
21};
22
23template <class>
24struct B
25{
26  private:
27  enum foo {bar}; // { dg-error "" } private
28  typedef int baz;  // { dg-error "" } private
29};
30
31struct D: public B<int>
32{
33  void choke (foo);   // { dg-error "" } within this context
34  void choke (baz);   // { dg-error "" } within this context
35};
36
37