* src/avr/ralloc.c (serialRegAssign),
[fw/sdcc] / src / z80 / ralloc.c
index 076277902ed9216c408ae3adb6653b85e6b26e5a..2b44c0e0fb42943f7d0c225762f5dde9f71f08d9 100644 (file)
@@ -1131,6 +1131,13 @@ serialRegAssign (eBBlock ** ebbs, int count)
              int j;
 
              D (D_ALLOC, ("serialRegAssign: in loop on result %p\n", sym));
+                
+             /* 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