OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [lookup/] [scoped1.C] - Rev 774

Go to most recent revision | Compare with Previous | Blame | View Log

// Test that explicitly scoped references to static members work even if
// they belong to an inaccessible base.

struct A
{
  static int i1;
  int i2; // { dg-error "inaccessible" "" }
  static void f1 ();
  void f2 ();
};

struct B: private A { };
struct C: public B
{
  void g ()
  {
    ::A::i1 = 1;
    ::A::i2 = 1;                // { dg-error "(access)|(context)" "" }
    ::A::f1 ();
    ::A::f2 ();                 // { dg-error "" }
  }
};

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.