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++.abi/] [primary4.C] - Rev 149

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

// { dg-do run  }
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 4 February 2001 <nathan@codesourcery.com>

// Check primary bases are chosen correctly.

struct A { virtual void Foo () {}};

struct B1 : virtual A {};
struct B2 : virtual A {};

struct C : virtual B1 {};

struct D : virtual B1, B2, C {};

int main ()
{
  D d;
  A *ap = &d;
  C *cp = &d;
  
#if __GXX_ABI_VERSION >= 100
  if (static_cast <void *> (ap) != static_cast <void *> (cp))
    return 1;
#endif

  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.