From: sandeep Date: Sat, 29 Dec 2001 22:38:35 +0000 (+0000) Subject: can reverse a loop even if function call is present as long X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=cd3f0aca1a5fa6e57c0c9b9324bd375db8b9955a;p=fw%2Fsdcc can reverse a loop even if function call is present as long as the loop control variable is local & is not passed as parameter git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1746 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCCast.c b/src/SDCCast.c index fcf5aa16..26cd0353 100644 --- a/src/SDCCast.c +++ b/src/SDCCast.c @@ -1644,6 +1644,9 @@ isConformingBody (ast * pbody, symbol * sym, ast * body) /* function call */ /*----------------------------*/ case CALL: + /* if local & not passed as paramater then ok */ + if (sym->level && !astHasSymbol(pbody->right,sym)) + return TRUE; return FALSE; /*------------------------------------------------------------------*/