struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-950628-1.c
blob46c59fd450ce0f8472ab71034516fd6c781e3d17
1 /*
2 950628-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 // TODO: Enable when sdcc supports struct return!
12 #if 0
13 typedef struct
15 char hours, day, month;
16 short year;
17 } T;
19 T g (void)
21 T now;
23 now.hours = 1;
24 now.day = 2;
25 now.month = 3;
26 now.year = 4;
27 return now;
30 T f (void)
32 T virk;
34 virk = g ();
35 return virk;
37 #endif
39 void
40 testTortureExecute (void)
42 #if 0
43 if (f ().hours != 1 || f ().day != 2 || f ().month != 3 || f ().year != 4)
44 ASSERT (0);
45 return;
46 #endif