URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 305 |
Rev 338 |
// { dg-do run }
|
// { dg-do run }
|
// GROUPS passed unions
|
// GROUPS passed unions
|
// This is fixed by finish_anon_union doing a string_cst_equal check on
|
// This is fixed by finish_anon_union doing a string_cst_equal check on
|
// the DECL_SIZE of the decls, instead of comparing the DECL_SIZE nodes.
|
// the DECL_SIZE of the decls, instead of comparing the DECL_SIZE nodes.
|
|
|
// The compiler currently fails to allocate space for the static union.
|
// The compiler currently fails to allocate space for the static union.
|
|
|
unsigned
|
unsigned
|
hash(const double d)
|
hash(const double d)
|
{
|
{
|
static union {
|
static union {
|
unsigned asint[2];
|
unsigned asint[2];
|
double asdouble;
|
double asdouble;
|
};
|
};
|
asdouble = d;
|
asdouble = d;
|
return asint[0] ^ asint[1];
|
return asint[0] ^ asint[1];
|
}
|
}
|
|
|
int main ()
|
int main ()
|
{
|
{
|
hash (3.1415);
|
hash (3.1415);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.