fix segfault on casting int to pointer
[fw/sdcc] / src / ds390 / ralloc.c
index 9d12c973d1c0609d175dc38cb595f9352daa03de..cb3062616cbabd8e122fe99c437f9b80b55bc019 100644 (file)
@@ -1076,7 +1076,8 @@ static void serialRegAssign (eBBlock **ebbs, int count)
                
                /* if we need ptr regs for the right side
                   then mark it */
-               if (POINTER_GET(ic) && getSize(OP_SYMBOL(IC_LEFT(ic))->type) 
+               if (POINTER_GET(ic) && IS_SYMOP(IC_LEFT(ic))
+                && getSize(OP_SYMBOL(IC_LEFT(ic))->type) 
                    <= PTRSIZE) 
                {
                    ds390_ptrRegReq++;
@@ -1720,6 +1721,14 @@ static int packRegsForSupport (iCode *ic, eBBlock *ebp)
 /*-----------------------------------------------------------------*/
 static iCode *packRegsForOneuse (iCode *ic, operand *op , eBBlock *ebp)
 {
+#if 1
+    
+    /* I can't figure out how to make this safe yet. */
+    ic; op; ebp;
+    return NULL;
+    
+    
+#else
     bitVect *uses ;
     iCode *dic, *sic;
 
@@ -1836,7 +1845,7 @@ static iCode *packRegsForOneuse (iCode *ic, operand *op , eBBlock *ebp)
                
     OP_SYMBOL(op)->ruonly = 1;
     return sic;
-       
+#endif 
 }
 
 /*-----------------------------------------------------------------*/