* src/avr/ralloc.c (serialRegAssign),
[fw/sdcc] / src / mcs51 / ralloc.c
index ca0deef7a0f5c740464642ba072613c9129ba630..c6db735b06a7e1b9d9799efa3e3ad072c52c41df 100644 (file)
@@ -1217,6 +1217,13 @@ serialRegAssign (eBBlock ** ebbs, int count)
                 int j;
                 int ptrRegSet = 0;
 
+                /* Make sure any spill location is definately allocated */
+                if (sym->isspilt && !sym->remat && sym->usl.spillLoc &&
+                    !sym->usl.spillLoc->allocreq)
+                  {
+                    sym->usl.spillLoc->allocreq++;
+                  }
+                  
                 /* if it does not need or is spilt
                    or is already assigned to registers
                    or will not live beyond this instructions */