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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.abi/] [layout1.C] - Rev 724

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

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

#if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100

struct R
{
  virtual void r ();
};

struct S 
{
  virtual void f ();
};

struct T : virtual public S
{
  virtual void g ();
};

struct U : public R, virtual public T
{
  virtual void h ();
};

struct V : public R, virtual public S, virtual public T
{
  virtual void v ();
};

struct U1
{
  R r;
  T t;
};

int main ()
{
  if (sizeof (U) != sizeof (U1))
    return 1;
  if (sizeof (V) != sizeof (U1))
    return 2;
}

#else /* !(defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100) */

int main ()
{
}

#endif /* !(defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100) */

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.