* src/avr/ralloc.c (serialRegAssign),
[fw/sdcc] / src / avr / ralloc.c
index 4724d789f1f6ea5f6c65a52cd5ca7dd81af64b8d..96426bb469d760067f25e802f44e8ec15d705903 100644 (file)
@@ -1365,6 +1365,12 @@ serialRegAssign (eBBlock ** ebbs, int count)
                                int willCS;
                                int j=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 */