URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
/* PR target/7559
|
/* PR target/7559
|
This testcase was miscompiled on x86-64, because classify_argument
|
This testcase was miscompiled on x86-64, because classify_argument
|
wrongly computed the offset of nested structure fields. */
|
wrongly computed the offset of nested structure fields. */
|
|
|
extern void abort (void);
|
extern void abort (void);
|
|
|
struct A
|
struct A
|
{
|
{
|
long x;
|
long x;
|
};
|
};
|
|
|
struct R
|
struct R
|
{
|
{
|
struct A a, b;
|
struct A a, b;
|
};
|
};
|
|
|
struct R R = { 100, 200 };
|
struct R R = { 100, 200 };
|
|
|
void f (struct R r)
|
void f (struct R r)
|
{
|
{
|
if (r.a.x != R.a.x || r.b.x != R.b.x)
|
if (r.a.x != R.a.x || r.b.x != R.b.x)
|
abort ();
|
abort ();
|
}
|
}
|
|
|
struct R g (void)
|
struct R g (void)
|
{
|
{
|
return R;
|
return R;
|
}
|
}
|
|
|
int main (void)
|
int main (void)
|
{
|
{
|
struct R r;
|
struct R r;
|
f(R);
|
f(R);
|
r = g();
|
r = g();
|
if (r.a.x != R.a.x || r.b.x != R.b.x)
|
if (r.a.x != R.a.x || r.b.x != R.b.x)
|
abort ();
|
abort ();
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.