summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/warp/bug1671812.js
blob: 560a01a8711f52cf018461955a9f3a4725071c93 (plain)
1
2
3
4
5
6
7
8
9
10
11
// |jit-test| --fast-warmup; --baseline-eager
function f() {
  let val1 = Math.sqrt(9007199254740992);
  let val2 = 0;
  let arr = new Float32Array(100);
  for (let i = 0; i < 100; i++) {
    val2 = arr[i];
  }
  return val1 + val2;
}
assertEq(f(), Math.sqrt(9007199254740992));