From: kvigor Date: Thu, 7 Dec 2000 17:33:23 +0000 (+0000) Subject: Fix reverseLoop optimization; fix suggested by Jerome Bessiere X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=3cb82e758dd7036fb96a4ab8cc891b90cd612b95;p=fw%2Fsdcc Fix reverseLoop optimization; fix suggested by Jerome Bessiere git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@516 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCast.c b/src/SDCCast.c index cc5aff3f..c8610e92 100644 --- a/src/SDCCast.c +++ b/src/SDCCast.c @@ -1475,7 +1475,7 @@ ast *reverseLoop (ast *loop, symbol *sym, ast *init, ast *end) forbody -= 1; if (sym) goto for_continue ; - = end - 1; */ + = end */ /* put it together piece by piece */ rloop = newNode (NULLOP, @@ -1485,8 +1485,7 @@ ast *reverseLoop (ast *loop, symbol *sym, ast *init, ast *end) NULL),NULL), newNode('=', newAst_VALUE(symbolVal(sym)), - newNode('-', end, - newAst_VALUE(constVal("1"))))); + end)); replLoopSym(loop->left, sym);