URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
/* PR tree-optimization/22043 */
|
/* PR tree-optimization/22043 */
|
|
|
extern void abort (void);
|
extern void abort (void);
|
|
|
struct A { int i; int j; int k; int l; };
|
struct A { int i; int j; int k; int l; };
|
struct B { struct A a; int r[1]; };
|
struct B { struct A a; int r[1]; };
|
struct C { struct A a; int r[0]; };
|
struct C { struct A a; int r[0]; };
|
struct D { struct A a; int r[]; };
|
struct D { struct A a; int r[]; };
|
|
|
void
|
void
|
foo (struct A *x)
|
foo (struct A *x)
|
{
|
{
|
if (x->i != 0 || x->j != 5 || x->k != 0 || x->l != 0)
|
if (x->i != 0 || x->j != 5 || x->k != 0 || x->l != 0)
|
abort ();
|
abort ();
|
}
|
}
|
|
|
int
|
int
|
main ()
|
main ()
|
{
|
{
|
struct B b = { .a.j = 5 };
|
struct B b = { .a.j = 5 };
|
struct C c = { .a.j = 5 };
|
struct C c = { .a.j = 5 };
|
struct D d = { .a.j = 5 };
|
struct D d = { .a.j = 5 };
|
foo (&b.a);
|
foo (&b.a);
|
foo (&c.a);
|
foo (&c.a);
|
foo (&d.a);
|
foo (&d.a);
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.