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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.bob/] [protected1.C] - Rev 823

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

// { dg-do assemble  }
class A {
public:
  int i;
  A(int j) : i(j){}
};

class B : protected A {
public:
  B(int j) : A(j){}
  void f(){
    A k(*this);
  }
};

class C : protected B {
public:
  C(int j) : B(j){}
  void f();

  void g(){
    A k(i); 
  }
};


class D : public C {
public:
   D(int w) : C(i) {}
   void j() { A k(*this); }
   void h() { i=3; }
};

void C::f() {
   A k(*this);
}

B b(3);
int
main() {
 A *z = &b; // { 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.