* src/SDCCmem.c (allocDefault): removed check sym->level==0 for SPEC_ABSA,
[fw/sdcc] / support / regression / tests / bug-460010.c
index 600205523119f671e7b3090a3af20a7d54dc0e9a..e5bf0ba6170df19fd53591337a27e14665e2e8f0 100644 (file)
@@ -2,11 +2,13 @@
  */
 #include <testfwk.h>
 
-#if defined __mcs51 || defined __ds390 || defined __xa51
-#define XDATA xdata
+#ifdef SDCC
+#ifdef SDCC_pic16
+#define ADDRESS 0x0070
 #else
-#define XDATA
-#endif
+#define ADDRESS 0xa000
+#endif  /* SDCC_pic16 */
+#endif  /* SDCC */
 
 void 
 func( unsigned char a )
@@ -19,7 +21,7 @@ testBadPromotion(void)
 {
 
 #ifdef SDCC
-  unsigned char c=*((unsigned XDATA char*)(0xa000));
+  unsigned char c=*((unsigned xdata char*)(ADDRESS));
 #else
   unsigned char loc_c;
   unsigned char c=*(unsigned char*)&loc_c;