+2006-05-30 Bernhard Held <bernhard AT bernhardheld.de>
+
+ * src/SDCCast.c (isLoopCountable): fixed bug #1478316
+
2006-05-27 Bernhard Held <bernhard AT bernhardheld.de>
* src/SDCCcse.c (findPointerSet): fixed bug #1493710
/* isLoopCountable - return true if the loop count can be determi- */
/* -ned at compile time . */
/*-----------------------------------------------------------------*/
-bool
+static bool
isLoopCountable (ast * initExpr, ast * condExpr, ast * loopExpr,
symbol ** sym, ast ** init, ast ** end)
{
else
return FALSE;
+ /* don't reverse loop with volatile counter */
+ if (IS_VOLATILE ((*sym)->type))
+ return FALSE;
+
/* for now the symbol has to be of
integral type */
if (!IS_INTEGRAL ((*sym)->type))
/* if the for loop is reversible. If yes will set the value of */
/* the loop control var & init value & termination value */
/*-----------------------------------------------------------------*/
-bool
+static bool
isLoopReversible (ast * loop, symbol ** loopCntrl,
ast ** init, ast ** end)
{