fixed the
[fw/sdcc] / src / mcs51 / ralloc.c
index 76040b5bf6dd7f73c69ee9406098c11d16fa211a..447c9ff11ce6be4341154476860fcaa7f87e2c0a 100644 (file)
@@ -2183,6 +2183,8 @@ accuse:
 /*-----------------------------------------------------------------*/
 /* packForPush - hueristics to reduce iCode for pushing            */
 /*-----------------------------------------------------------------*/
+catchMe() {}
+
 static void
 packForPush (iCode * ic, eBBlock * ebp)
 {
@@ -2212,6 +2214,16 @@ packForPush (iCode * ic, eBBlock * ebp)
     if (bitVectBitValue(dbv,lic->key)) 
       return ;
   }
+  /* make sure they have the same type */
+  {
+    sym_link *itype=operandType(IC_LEFT(ic));
+    sym_link *ditype=operandType(IC_RIGHT(dic));
+
+    if (SPEC_USIGN(itype)!=SPEC_USIGN(ditype) ||
+       SPEC_SHORT(itype)!=SPEC_SHORT(ditype) ||
+       SPEC_USIGN(itype)!=SPEC_USIGN(ditype))
+      return;
+  }
   /* extend the live range of replaced operand if needed */
   if (OP_SYMBOL(IC_RIGHT(dic))->liveTo < ic->seq) {
          OP_SYMBOL(IC_RIGHT(dic))->liveTo = ic->seq;