Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20020810-1.c
blob4fabb94b31c2869399e542987a284994e988d73b
1 /*
2 20020810-1.c from the execute part of the gcc torture suite.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 #if 0 // TODO: enable when support for struct initialization is complete!
12 /* PR target/7559
13 This testcase was miscompiled on x86-64, because classify_argument
14 wrongly computed the offset of nested structure fields. */
16 struct A
18 long x;
21 struct R
23 struct A a, b;
26 struct R R = { 100, 200 };
28 void f (struct R r)
30 if (r.a.x != R.a.x || r.b.x != R.b.x)
31 ASSERT (0);
34 struct R g (void)
36 return R;
38 #endif
40 void testTortureExecute (void)
42 #if 0
43 struct R r;
44 f(R);
45 r = g();
46 if (r.a.x != R.a.x || r.b.x != R.b.x)
47 ASSERT (0);
48 return;
49 #endif