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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [ref3.C] - Rev 699

Compare with Previous | Blame | View Log

// { dg-do run  }
// Origin: Mark Mitchell <mark@codesourcery.com>

struct B1
{
  int i;
};

struct B2
{
  int j;
};

struct D: public B1, B2 
{
};

bool f (B2& b)
{
  return b.j == 7;
}

int main ()
{
  D d;
  d.i = 2;
  d.j = 7;
  if (!f (d))
    return 1;
}

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.