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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [init/] [copy5.C] - Blame information for rev 801

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-options "-O2" }
2
 
3
struct BOOL {
4
    int nVal:1, bSet:1;
5
    BOOL (int i) : nVal(i!=0), bSet(1) {}
6
};
7
struct Fill {
8
    void *d;
9
    Fill() : d(0) {}
10
    Fill( const Fill& ) {}
11
};
12
struct SvMetaSlot {
13
    Fill aGroupId;
14
    BOOL a8;
15
    SvMetaSlot() :
16
      a8(1) {}
17
    SvMetaSlot* MakeClone() const;
18
};
19
 
20
SvMetaSlot* SvMetaSlot::MakeClone() const { return new SvMetaSlot( *this ); }
21
 
22
extern "C" void abort(void);
23
int main()
24
{
25
  SvMetaSlot s; SvMetaSlot s2(s);
26
  if (s.a8.bSet != s2.a8.bSet)
27
    abort ();
28
  return 0;
29
}

powered by: WebSVN 2.1.0

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