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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.abi/] [empty3.C] - Rev 338

Compare with Previous | Blame | View Log

// { dg-do assemble  }

// Copyright (C) 2001 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 12 Apr 2001 <nathan@codesourcery.com>

// Check we deal with aligning virtual bases after a trailing empty
// base class properly

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

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

int main ()
{
#if defined (__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100
  C c;
  if (((char *)static_cast <B3 *> (&c) - (char *)&c) % __alignof__ (C))
    return 1;
#endif
  return 0;
}

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.