* src/avr/ralloc.c (serialRegAssign),
[fw/sdcc] / src / pic / ralloc.c
index 1f70bc37c4d0ae180e23f3bfe0e250067af12264..d836a1682ceb2b5d1a2d66ded8f3ff46b8b8ca3c 100644 (file)
@@ -2291,7 +2291,14 @@ 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
                                or will not live beyond this instructions */