URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
/* The bit-field below would have a problem if __INT_MAX__ is too
|
/* The bit-field below would have a problem if __INT_MAX__ is too
|
small. */
|
small. */
|
#if __INT_MAX__ < 2147483647
|
#if __INT_MAX__ < 2147483647
|
int
|
int
|
main (void)
|
main (void)
|
{
|
{
|
exit (0);
|
exit (0);
|
}
|
}
|
#else
|
#else
|
/*
|
/*
|
CONF:m68k-sun-sunos4.1.1
|
CONF:m68k-sun-sunos4.1.1
|
OPTIONS:-O
|
OPTIONS:-O
|
*/
|
*/
|
struct T
|
struct T
|
{
|
{
|
unsigned i:8;
|
unsigned i:8;
|
unsigned c:24;
|
unsigned c:24;
|
};
|
};
|
f(struct T t)
|
f(struct T t)
|
{
|
{
|
struct T s[1];
|
struct T s[1];
|
s[0]=t;
|
s[0]=t;
|
return(char)s->c;
|
return(char)s->c;
|
}
|
}
|
main()
|
main()
|
{
|
{
|
struct T t;
|
struct T t;
|
t.i=0xff;
|
t.i=0xff;
|
t.c=0xffff11;
|
t.c=0xffff11;
|
if(f(t)!=0x11)abort();
|
if(f(t)!=0x11)abort();
|
exit(0);
|
exit(0);
|
}
|
}
|
#endif
|
#endif
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.