2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / access8.C
blobabd401b12e5e442a57acd4eef45afda6073ba9ef
1 // { dg-do assemble  }
2 // Copyright (C) 2000 Free Software Foundation, Inc.
3 // Contributed by Nathan Sidwell 10 Feb 2000 <nathan@acm.org>
5 // Test that access to static members from a nested class of the derived
6 // type works.
8 class Base
10   protected:
11   static int Some_var;
12   typedef int Some_t;
15 class Derived : Base
17   protected:
18   struct Nested
19   {
20     void Foo (Some_t);
21     void Bar (Base::Some_t) { Base::Some_var = 1; }
22   };
25 void Derived::Nested::Foo (Some_t) {
26   Some_var = 2;