* src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr, createIval): imple...
[fw/sdcc] / src / SDCCcse.c
index c64866f2891e6b71d1ebd0b295214d4b9ec02819..e56c84a581551a5fe36ceee9f9654e18a225f3b7 100644 (file)
@@ -148,7 +148,7 @@ void ReplaceOpWithCheaperOp(operand **op, operand *cop) {
           IS_SYMOP((*op)) ? OP_SYMBOL((*op))->name : "!SYM",
           IS_SYMOP(cop) ? OP_SYMBOL(cop)->name : "!SYM");
   // if op is a register equivalent
-  if (IS_ITEMP(cop) && OP_SYMBOL((*op))->isreqv) {
+  if (IS_ITEMP(cop) && IS_SYMOP((*op)) && OP_SYMBOL((*op))->isreqv) {
     operand **rop = &OP_SYMBOL((*op))->usl.spillLoc->reqv;
     if (isOperandEqual(*rop, *op)) {
       printf ("true");
@@ -1752,6 +1752,9 @@ static int isSignedOp (iCode *ic)
     case RRC:
     case RLC:
     case GETHBIT:
+    case GETABIT:
+    case GETBYTE:
+    case GETWORD:
     case RIGHT_OP:
     case CAST:
     case ARRAYINIT: