URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 301 |
Rev 384 |
// { dg-options "-O2" }
|
// { dg-options "-O2" }
|
|
|
struct BOOL {
|
struct BOOL {
|
int nVal:1, bSet:1;
|
int nVal:1, bSet:1;
|
BOOL (int i) : nVal(i!=0), bSet(1) {}
|
BOOL (int i) : nVal(i!=0), bSet(1) {}
|
};
|
};
|
struct Fill {
|
struct Fill {
|
void *d;
|
void *d;
|
Fill() : d(0) {}
|
Fill() : d(0) {}
|
Fill( const Fill& ) {}
|
Fill( const Fill& ) {}
|
};
|
};
|
struct SvMetaSlot {
|
struct SvMetaSlot {
|
Fill aGroupId;
|
Fill aGroupId;
|
BOOL a8;
|
BOOL a8;
|
SvMetaSlot() :
|
SvMetaSlot() :
|
a8(1) {}
|
a8(1) {}
|
SvMetaSlot* MakeClone() const;
|
SvMetaSlot* MakeClone() const;
|
};
|
};
|
|
|
SvMetaSlot* SvMetaSlot::MakeClone() const { return new SvMetaSlot( *this ); }
|
SvMetaSlot* SvMetaSlot::MakeClone() const { return new SvMetaSlot( *this ); }
|
|
|
extern "C" void abort(void);
|
extern "C" void abort(void);
|
int main()
|
int main()
|
{
|
{
|
SvMetaSlot s; SvMetaSlot s2(s);
|
SvMetaSlot s; SvMetaSlot s2(s);
|
if (s.a8.bSet != s2.a8.bSet)
|
if (s.a8.bSet != s2.a8.bSet)
|
abort ();
|
abort ();
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.