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++.mike/] [p3041.C] - Rev 823

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

// { dg-do run  }
// prms-id: 3041

class A {
public:
  A() { }
  virtual void a() = 0;
  static int b(A * p) {
    p->a();
    return 1;
  }
};

class B : virtual public A {
public:
  B() {
    static int installed = b(this);
  }
  void a() { }
};

class C : virtual public B {
public:
  C() {
    static int installed = b(this);
  }
  void a() { }
};

int main()
{
  C c;
  return 0;
}

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.