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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [init/] [empty1.C] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do run }
2
 
3
// Copyright (C) 2001 Free Software Foundation, Inc.
4
// Contributed by Nathan Sidwell 3 Sept 2001 
5
 
6
// Bug 4203. We were bit copying empty bases including the
7
// padding. Which clobbers whatever they overlay.
8
 
9
class EmptyBase0 {};
10
class EmptyBase1 : public EmptyBase0 {};
11
class Base1
12
{
13
public:
14
unsigned int t_;
15
Base1(unsigned int t) : t_(t) {}
16
};
17
 
18
class PEPE : public Base1, public EmptyBase1
19
{
20
public:
21
PEPE(unsigned int t)
22
  : Base1(t), EmptyBase1(EmptyBase1()) {}
23
};
24
 
25
int main()
26
{
27
  PEPE pepe(0xff);
28
 
29
  return pepe.t_ != 255;
30
}

powered by: WebSVN 2.1.0

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