URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [access8.C] - Rev 384
Compare with Previous | Blame | View Log
// { dg-do assemble }
// 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;
}