From: bernhardheld Date: Tue, 6 Feb 2007 19:50:30 +0000 (+0000) Subject: * src/SDCCBlock.c (addiCodeToeBBlock): fixed bug 1652207: GOTO icodes appended by... X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=266b3bff466506468e574941d1563c9d837cf0f9;p=fw%2Fsdcc * src/SDCCBlock.c (addiCodeToeBBlock): fixed bug 1652207: GOTO icodes appended by loop induction must be at the very end of the eBBlock git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4620 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index 0944b5d9..5e2bcd5a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-02-06 Bernhard Held + + * src/SDCCBlock.c (addiCodeToeBBlock): fixed bug 1652207: GOTO icodes + appended by loop induction must be at the very end of the eBBlock + 2007-02-05 Borut Razem * support/regression/fwk/lib/timeout.c: native WIN32 port, diff --git a/src/SDCCBBlock.c b/src/SDCCBBlock.c index 9d9558ed..28d56e5a 100644 --- a/src/SDCCBBlock.c +++ b/src/SDCCBBlock.c @@ -463,7 +463,10 @@ addiCodeToeBBlock (eBBlock * ebp, iCode * ic, iCode * ip) /* if this is true then we put it before the condition else */ /* we put it before if, this is to reduce register pressure, */ /* we don't have to hold condition too long in a register */ - if (ebp->ech->op == IFX) + + /* loop induction sometimes appends a GOTO instruction, */ + /* it must be at the very end */ + if (ebp->ech->op == IFX && ic->op != GOTO) { iCode *ipoint;