struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20000717-4.c
blob9f4f87dc9ec9430e60f4611006f9b631ead38e6f
1 /*
2 20000717-4.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 /* Extracted from gas. Incorrectly generated non-pic code at -O0 for
12 IA-64, which produces linker errors on some operating systems. */
14 #ifndef __SDCC_pdk14 // Lack of memory
15 struct
17 int offset;
18 struct slot
20 int field[6];
22 slot[4];
23 } s;
25 int
26 x ()
28 int toggle = 0;
29 int r = s.slot[0].field[!toggle];
30 return r;
32 #endif
34 void
35 testTortureExecute (void)
37 return;