summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/jaeger/bug719918.js
blob: 388189269eb4869b01a69dae5a6697a5c5c2cb00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function test(m) {
  do {
    if (m = arr[0]) break;
    m = 0;
  }
  while (0);
  arr[1] = m;
}

arr = new Float64Array(2);

// run function a lot to trigger methodjit compile
for(var i=0; i<200; i++)
  test(0);

// should return 0, not NaN
assertEq(arr[1], 0)