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-990525-2.c
blob2b2411e4589ff27fa468a377d0a553a474cd01b1
1 /*
2 990525-2.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 can return struct!
12 #if 0
13 typedef struct {
14 int v[4];
15 } Test1;
17 Test1 func2();
19 int func1()
21 Test1 test;
22 test = func2();
24 if (test.v[0] != 10)
25 ASSERT (0);
26 if (test.v[1] != 20)
27 ASSERT (0);
28 if (test.v[2] != 30)
29 ASSERT (0);
30 if (test.v[3] != 40)
31 ASSERT (0);
34 Test1 func2()
36 Test1 tmp;
37 tmp.v[0] = 10;
38 tmp.v[1] = 20;
39 tmp.v[2] = 30;
40 tmp.v[3] = 40;
41 return tmp;
43 #endif
45 void
46 testTortureExecute (void)
48 #if 0
49 func1();
50 return;
51 #endif