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