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/] [p10849a.C] - Rev 823

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

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

struct A
{
  int comm;
  A(int i) : comm(i) { }
};

struct S1 { char c1; };

struct B : public S1, public A
{
  B(int i) : A(i) { }
};

struct C : public A
{
  C(int i) : A(i) { }
};

struct D : public B, public C
{
  virtual int g() {
    int D::*pmd = (int C::*)&C::comm;
    return (this->*pmd) == 42;
  }
  D() : B(41), C(42) { }
} d;

int main() {
  if (! d.g())
    return 1;
}

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.