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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [ipa/] [pr46053.C] - Rev 801

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

/* { dg-do run } */
/* { dg-options "-O -fipa-cp -fno-early-inlining"  } */

extern "C" void abort ();

struct A
{
  virtual void foo () = 0;
};

struct B : A
{
  virtual void foo () = 0;
};

struct C : A
{
};

struct D : C, B
{
  int i;
  D () : i(0xaaaa) {}
  virtual void foo ()
  {
    if (i != 0xaaaa)
      abort();
  }
};

static inline void bar (B &b)
{
  b.foo ();
}

int main()
{
  D d;
  bar (d);
  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.