no bitfields yet
[fw/sdcc] / support / regression / tests / bug-460010.c
index abf31678b7651b2a61bd2a186cdffca4c35f04ed..600205523119f671e7b3090a3af20a7d54dc0e9a 100644 (file)
@@ -2,7 +2,7 @@
  */
 #include <testfwk.h>
 
-#ifdef __mcs51
+#if defined __mcs51 || defined __ds390 || defined __xa51
 #define XDATA xdata
 #else
 #define XDATA
@@ -17,7 +17,13 @@ func( unsigned char a )
 void
 testBadPromotion(void)
 {
+
+#ifdef SDCC
   unsigned char c=*((unsigned XDATA char*)(0xa000));
+#else
+  unsigned char loc_c;
+  unsigned char c=*(unsigned char*)&loc_c;
+#endif 
   
   func(c);