Skip to content

Commit

Permalink
Merge pull request #2634 from WalterBright/fix7156
Browse files Browse the repository at this point in the history
fix Issue 7156 - ICE(go.c): with 199 or 200 repeated integer increments,...
  • Loading branch information
braddr authored and WalterBright committed Oct 7, 2013
1 parent 5e91521 commit 2452bf6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/backend/go.c
Expand Up @@ -221,12 +221,13 @@ void optfunc()

// Each pass through the loop can reduce only one level of comma expression.
// The infinite loop check needs to take this into account.
// Add 100 just to give optimizer more rope to try to converge.
int iterationLimit = 0;
for (b = startblock; b; b = b->Bnext)
{
if (!b->Belem)
continue;
int d = el_countCommas(b->Belem);
int d = el_countCommas(b->Belem) + 100;
if (d > iterationLimit)
iterationLimit = d;
}
Expand Down

0 comments on commit 2452bf6

Please sign in to comment.