summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testBranchingUnstableLoopCounter.js
blob: 53fff9e0873fe898ef9653621ad0b0a0aa46d6bd (plain)
1
2
3
4
5
6
7
8
9
10
11
function testBranchingUnstableLoopCounter() {
  var x = 0;
  for (var i=0; i < 100; ++i) {
    if (i == 51) {
      i += 1.1;
    }
    x++;
  }
  return x;
}
assertEq(testBranchingUnstableLoopCounter(), 99);