summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug878510.js
blob: 05b84976d9db792eb85a162fb1f1f5d7af15995a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function neg0(x) {
  return x===0 && (1/x)===-Infinity;
}

function test(x,y) {
  if (x == 1.1)
    return 0;
  else if (x == "a")
    return 0;
  return x*y
}

var t = 0;
for(var i=0; i<1005; i++) {
  test(1.1)
  test("a")
  t = test((i<1003)?i:-0, 0);
}

assertEq(neg0(t), true);