* src/SDCClrange.c (findNextUseSym): fixed a live range bug with
authorepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 21 Jun 2004 15:31:04 +0000 (15:31 +0000)
committerepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 21 Jun 2004 15:31:04 +0000 (15:31 +0000)
variables used exclusively within a loop

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3364 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/SDCClrange.c

index 9fedf455838e919b7d7235127c49b1995e8ec3db..c5083a14b46a3aab0496ef5f4a195f9b16d40d33 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-06-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
+
+       * src/SDCClrange.c (findNextUseSym): fixed a live range bug with
+       variables used exclusively within a loop
+
 2004-06-21 Bernhard Held <bernhard AT bernhardheld.de>
 
        * src/mcs51/gen.c (genCpl): quick fix for bug #974835
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)