struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-868103.c.in
blobbec1cbcc707e17af88ce78fa8e0d3b7fb9437eb7
1 /** Bug 868103 tests.
3 storage1: __near, __far, __code,
4 storage2: __near, __far,
5 */
7 #ifndef STORAGE1
8 #define STORAGE1 {storage1}
9 #endif
11 #ifndef STORAGE2
12 #define STORAGE2 {storage2}
13 #endif
15 #include <testfwk.h>
17 typedef struct {
18 STORAGE1 char * bar[2];
19 } foo;
21 STORAGE1 char c = 'x';
22 STORAGE2 foo f;
24 void
25 testBug868103 (void)
27 f.bar[1] = &c;
28 ASSERT (f.bar[1] == &c);