* src/SDCClrange.c (findNextUseSym): fixed a live range bug with
[fw/sdcc] / src / SDCClrange.c
index fe7eadc6c14524451ecc6fbd8f03c7a1d9791ad6..ddf84ae8251d18e77308fd548a34bec3ccf7b0fc 100644 (file)
@@ -219,7 +219,8 @@ findNextUseSym (eBBlock *ebp, iCode *ic, symbol * sym)
   if (ebp->visited)
     return 0;
 
-  ebp->visited = 1;
+  if (ic == ebp->sch)
+    ebp->visited = 1;
 
   /* for all remaining instructions in current block */
   for (uic = ic; uic; uic = uic->next)