2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20020810-1.c
blobd3386973a70138445b7266fefb62253d1f59a9be
1 /* PR target/7559
2 This testcase was miscompiled on x86-64, because classify_argument
3 wrongly computed the offset of nested structure fields. */
5 extern void abort (void);
7 struct A
9 long x;
12 struct R
14 struct A a, b;
17 struct R R = { 100, 200 };
19 void f (struct R r)
21 if (r.a.x != R.a.x || r.b.x != R.b.x)
22 abort ();
25 struct R g (void)
27 return R;
30 int main (void)
32 struct R r;
33 f(R);
34 r = g();
35 if (r.a.x != R.a.x || r.b.x != R.b.x)
36 abort ();
37 return 0;