* src/avr/ralloc.c (serialRegAssign),
[fw/sdcc] / src / ds390 / ralloc.c
index fbb65ed8174bbdffb2a4db8bf59433602d00f963..627cc4756f95f04f7d4a9cdcc39a3ed8d1c88ae5 100644 (file)
@@ -1307,6 +1307,13 @@ serialRegAssign (eBBlock ** ebbs, int count)
               int willCS;
               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