Previous fix was BADDD . this should do it
[fw/sdcc] / src / avr / gen.c
index c2cb6e27e497ddea38e4c7c2db7a3027c16bd2f5..638182ab0d4e9eeb6c279864df83d729d03b8777 100644 (file)
@@ -724,7 +724,7 @@ aopOp (operand * op, iCode * ic, bool result)
        }
 
        /* if already has a asmop then continue */
-       if (op->aop && aop->size == getSize(sym->type))
+       if (op->aop)
                return;
 
        /* if the underlying symbol has a aop */
@@ -783,6 +783,10 @@ aopOp (operand * op, iCode * ic, bool result)
                }
 
                /* else spill location  */
+               if (sym->usl.spillLoc && getSize(sym->type) != getSize(sym->usl.spillLoc->type)) {
+                   /* force a new aop if sizes differ */
+                   sym->usl.spillLoc->aop = NULL;
+               }
                sym->aop = op->aop = aop =
                        aopForSym (ic, sym->usl.spillLoc, result);
                aop->size = getSize (sym->type);