new
authorJason Merrill <jason@gcc.gnu.org>
Sun, 13 Feb 2000 19:27:43 +0000 (14:27 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Sun, 13 Feb 2000 19:27:43 +0000 (14:27 -0500)
From-SVN: r31956

gcc/testsuite/g++.old-deja/g++.other/access8.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.old-deja/g++.other/access8.C b/gcc/testsuite/g++.old-deja/g++.other/access8.C
new file mode 100644 (file)
index 0000000..ae516ff
--- /dev/null
@@ -0,0 +1,27 @@
+// Build don't link:
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 10 Feb 2000 <nathan@acm.org>
+
+// Test that access to static members from a nested class of the derived
+// type works.
+
+class Base
+{
+  protected:
+  static int Some_var;
+  typedef int Some_t;
+};
+
+class Derived : Base
+{
+  protected:
+  struct Nested
+  {
+    void Foo (Some_t);
+    void Bar (Base::Some_t) { Base::Some_var = 1; }
+  };
+};
+
+void Derived::Nested::Foo (Some_t) {
+  Some_var = 2;
+}