struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-221168.c
blob793f29f8f2573d9b2c2090be32ae92d8cdfccb46
1 /* bug-221168.c
2 */
3 #include <testfwk.h>
5 #if !defined( __SDCC_pdk14) && !defined( __SDCC_pdk15) // Lack of memory
6 __xdata static char x[10][20];
8 __xdata char *
9 getAddrOfCell (unsigned char y, unsigned char z)
11 return &x[y][z];
13 #endif
15 static void
16 testMultiDimensionalAddress (void)
18 #if !defined( __SDCC_pdk14) && !defined( __SDCC_pdk15) // Lack of memory
19 ASSERT (getAddrOfCell (5, 6) == (char __xdata *)x + 106);
20 #endif