* src/SDCCast.c (isConformingBody): fixed loop reversal bug
authorepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 5 Sep 2003 05:08:19 +0000 (05:08 +0000)
committerepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 5 Sep 2003 05:08:19 +0000 (05:08 +0000)
reported in bug #800609

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

ChangeLog
src/SDCCast.c

index 9c21805042fdca521f51d5b670cf94a71862593f..414d399132c03af4bfe91fce5db798e4cd1e825f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-09-05  Erik Petrich <epetrich@ivorytower.norman.ok.us>
+       * src/SDCCast.c (isConformingBody): fixed loop reversal bug
+       reported in bug #800609
+
 2003-09-04  Vangelis Rokas <vrokas@otenet.gr>
        * Top header beautifications in src/pic16 directory:
          device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
 2003-09-04  Vangelis Rokas <vrokas@otenet.gr>
        * Top header beautifications in src/pic16 directory:
          device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
index c50f127d8ce03256b84ece9276cc47bccfc5f989..b230e23cba7cbb82125c2839dfaf72979d2e2dfc 100644 (file)
@@ -1697,7 +1697,7 @@ isConformingBody (ast * pbody, symbol * sym, ast * body)
          return FALSE;
        // if the loopvar is used in another (maybe conditional) block
        if (astHasSymbol (pbody->right, sym) &&
          return FALSE;
        // if the loopvar is used in another (maybe conditional) block
        if (astHasSymbol (pbody->right, sym) &&
-           (pbody->level > body->level)) {
+           (pbody->level >= body->level)) {
          return FALSE;
        }
       }
          return FALSE;
        }
       }