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-931004-13.c
blob3609247baf30659301ed6e105d690d93d0290d01
1 /*
2 931004-13.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 // Todo: Enable when sdcc supports struct!
12 #if 0
13 struct tiny
15 char c;
16 char d;
17 char e;
18 char f;
21 f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
23 if (x.c != 10)
24 ASSERT (0);
25 if (x.d != 20)
26 ASSERT (0);
27 if (x.e != 30)
28 ASSERT (0);
29 if (x.f != 40)
30 ASSERT (0);
32 if (y.c != 11)
33 ASSERT (0);
34 if (y.d != 21)
35 ASSERT (0);
36 if (y.e != 31)
37 ASSERT (0);
38 if (y.f != 41)
39 ASSERT (0);
41 if (z.c != 12)
42 ASSERT (0);
43 if (z.d != 22)
44 ASSERT (0);
45 if (z.e != 32)
46 ASSERT (0);
47 if (z.f != 42)
48 ASSERT (0);
50 if (l != 123)
51 ASSERT (0);
53 #endif
55 void
56 testTortureExecute (void)
58 #if 0
59 struct tiny x[3];
60 x[0].c = 10;
61 x[1].c = 11;
62 x[2].c = 12;
63 x[0].d = 20;
64 x[1].d = 21;
65 x[2].d = 22;
66 x[0].e = 30;
67 x[1].e = 31;
68 x[2].e = 32;
69 x[0].f = 40;
70 x[1].f = 41;
71 x[2].f = 42;
72 f (3, x[0], x[1], x[2], (long) 123);
73 return;
74 #endif