Previous fix was BADDD . this should do it
[fw/sdcc] / src / ds390 / gen.c
index ff42baaae1c7d3781a7d07d8c21fbfd3da8cc7e1..cc4aab1148a008d3205fd0a60a5c533f835d0839 100644 (file)
@@ -746,7 +746,7 @@ aopOp (operand * op, iCode * ic, bool result, bool useDP2)
     }
 
   /* 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 */
@@ -827,6 +827,10 @@ aopOp (operand * op, iCode * ic, bool result, bool useDP2)
        }
 
       /* 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, useDP2);
       aop->size = getSize (sym->type);