URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 298 |
Rev 338 |
/* PR c/11446: packed on a struct takes precedence over aligned on the type
|
/* PR c/11446: packed on a struct takes precedence over aligned on the type
|
of a field. */
|
of a field. */
|
/* { dg-do run } */
|
/* { dg-do run } */
|
|
|
extern void abort (void);
|
extern void abort (void);
|
|
|
struct A {
|
struct A {
|
double d;
|
double d;
|
} __attribute__ ((aligned));
|
} __attribute__ ((aligned));
|
|
|
struct B {
|
struct B {
|
char c;
|
char c;
|
struct A a;
|
struct A a;
|
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
|
|
int main ()
|
int main ()
|
{
|
{
|
if (sizeof (struct B) != sizeof (char) + sizeof (struct A))
|
if (sizeof (struct B) != sizeof (char) + sizeof (struct A))
|
abort ();
|
abort ();
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.