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++.other/] [virtual3.C] - Diff between revs 154 and 816

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 154 Rev 816
// { dg-do run  }
// { dg-do run  }
struct B
struct B
{
{
  virtual int f() volatile
  virtual int f() volatile
    { return 1; }
    { return 1; }
};
};
struct D : public B
struct D : public B
{
{
  int f()
  int f()
    { return 0; }
    { return 0; }
};
};
struct D2 : public D
struct D2 : public D
{
{
  int f()
  int f()
    { return 2; }
    { return 2; }
};
};
int main()
int main()
{
{
  D2 d2;
  D2 d2;
  D& d = d2;
  D& d = d2;
  return d.f();
  return d.f();
}
}
 
 

powered by: WebSVN 2.1.0

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