URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
struct foo
|
struct foo
|
{
|
{
|
unsigned half:16;
|
unsigned half:16;
|
unsigned long whole:32 __attribute__ ((packed));
|
unsigned long whole:32 __attribute__ ((packed));
|
};
|
};
|
|
|
f (struct foo *q)
|
f (struct foo *q)
|
{
|
{
|
if (q->half != 0x1234)
|
if (q->half != 0x1234)
|
abort ();
|
abort ();
|
if (q->whole != 0x56789abcL)
|
if (q->whole != 0x56789abcL)
|
abort ();
|
abort ();
|
}
|
}
|
|
|
main ()
|
main ()
|
{
|
{
|
struct foo bar;
|
struct foo bar;
|
|
|
bar.half = 0x1234;
|
bar.half = 0x1234;
|
bar.whole = 0x56789abcL;
|
bar.whole = 0x56789abcL;
|
f (&bar);
|
f (&bar);
|
exit (0);
|
exit (0);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.