* src/mcs51/gen.c (genPagedPointerSet): fixed bug 1670148
[fw/sdcc] / support / regression / tests / bug-221168.c
index 623f06b4df42fcd445cf57c15618a6354eeb4d43..15cc281d03d6f644a190f79095ec143b920409db 100644 (file)
@@ -2,7 +2,11 @@
  */
 #include <testfwk.h>
 
-#define XDATA
+#ifdef __mcs51
+#  define XDATA xdata
+#else
+#  define XDATA
+#endif
 
 XDATA static char x[10][20];
 
@@ -15,5 +19,5 @@ getAddrOfCell(unsigned char y, unsigned char z)
 static void
 testMultiDimensionalAddress(void)
 {
-    ASSERT(getAddrOfCell(5, 6) == (char *)x + 106);
+    ASSERT(getAddrOfCell(5, 6) == (char XDATA *)x + 106);
 }