From: bernhardheld Date: Mon, 9 Feb 2004 12:25:29 +0000 (+0000) Subject: * src/SDCCcse.c (algebraicOpts): copy operands before modification X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=7509c54acfc8ec99fc043d3717dad8e338dabc7f;p=fw%2Fsdcc * src/SDCCcse.c (algebraicOpts): copy operands before modification git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3185 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index c16339d7..cb17b138 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-02-09 Bernhard Held + + * src/SDCCcse.c (algebraicOpts): copy operands before modification + 2004-02-09 Erik Petrich * src/SDCCsymt.h, diff --git a/src/SDCCcse.c b/src/SDCCcse.c index 24bd57b5..1466760c 100644 --- a/src/SDCCcse.c +++ b/src/SDCCcse.c @@ -914,6 +914,7 @@ algebraicOpts (iCode * ic, eBBlock * ebp) else { ic->op = CAST; + IC_LEFT (ic) = operandFromOperand (IC_LEFT (ic)); IC_LEFT (ic)->type = TYPE; IC_LEFT (ic)->isLiteral = 0; setOperandType (IC_LEFT (ic), operandType (IC_RESULT (ic))); @@ -952,7 +953,7 @@ algebraicOpts (iCode * ic, eBBlock * ebp) ic->op = CAST; op = IC_RIGHT (ic); IC_RIGHT (ic) = IC_LEFT (ic); - IC_LEFT (ic) = op; + IC_LEFT (ic) = operandFromOperand (op); IC_LEFT (ic)->type = TYPE; IC_LEFT (ic)->isLiteral = 0; setOperandType (IC_LEFT (ic), operandType (IC_RESULT (ic)));