OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.abi/] [primary2.C] - Diff between revs 305 and 384

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

Rev 305 Rev 384
// { dg-do run  }
// { dg-do run  }
// Copyright (C) 2000 Free Software Foundation, Inc.
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 4 February 2001 
// Contributed by Nathan Sidwell 4 February 2001 
// Check primary bases are chosen correctly.
// Check primary bases are chosen correctly.
struct A {virtual void Foo () {}};
struct A {virtual void Foo () {}};
struct B : virtual A {};
struct B : virtual A {};
struct C : virtual B {};
struct C : virtual B {};
struct D : virtual B, virtual C {};
struct D : virtual B, virtual C {};
int main ()
int main ()
{
{
  D d;
  D d;
#if __GXX_ABI_VERSION >= 100
#if __GXX_ABI_VERSION >= 100
  if (sizeof (D) != sizeof (A))
  if (sizeof (D) != sizeof (A))
    return 1;
    return 1;
#endif
#endif
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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