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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [init/] [empty1.C] - Diff between revs 149 and 154

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

Rev 149 Rev 154
// { dg-do run }
// { dg-do run }
// Copyright (C) 2001 Free Software Foundation, Inc.
// Copyright (C) 2001 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 3 Sept 2001 
// Contributed by Nathan Sidwell 3 Sept 2001 
// Bug 4203. We were bit copying empty bases including the
// Bug 4203. We were bit copying empty bases including the
// padding. Which clobbers whatever they overlay.
// padding. Which clobbers whatever they overlay.
class EmptyBase0 {};
class EmptyBase0 {};
class EmptyBase1 : public EmptyBase0 {};
class EmptyBase1 : public EmptyBase0 {};
class Base1
class Base1
{
{
public:
public:
unsigned int t_;
unsigned int t_;
Base1(unsigned int t) : t_(t) {}
Base1(unsigned int t) : t_(t) {}
};
};
class PEPE : public Base1, public EmptyBase1
class PEPE : public Base1, public EmptyBase1
{
{
public:
public:
PEPE(unsigned int t)
PEPE(unsigned int t)
  : Base1(t), EmptyBase1(EmptyBase1()) {}
  : Base1(t), EmptyBase1(EmptyBase1()) {}
};
};
int main()
int main()
{
{
  PEPE pepe(0xff);
  PEPE pepe(0xff);
  return pepe.t_ != 255;
  return pepe.t_ != 255;
}
}
 
 

powered by: WebSVN 2.1.0

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