* src/SDCCast.c (isLoopCountable): fixed bug #
1161985
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3697
4a8a32a2-be11-0410-ad9d-
d568d2c75423
+2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
+
+ * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
+ * src/SDCCast.c (isLoopCountable): fixed bug #1161985
+
2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
* device/lib/printf_large.c: removed inline assembly for portability and
}
}
+ else
+ return FALSE;
/* check loop expression is of the form <sym>++ */
if (!IS_AST_OP (loopExpr))
/* if after all this it becomes an assignment to self
then delete it and continue */
- if (ASSIGNMENT_TO_SELF (ic))
+ if (ASSIGNMENT_TO_SELF (ic) && !isOperandVolatile (IC_RIGHT(ic), FALSE))
{
remiCodeFromeBBlock (ebb, ic);
continue;