diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/jit-test/tests/warp/bug1719884.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/warp/bug1719884.js b/js/src/jit-test/tests/warp/bug1719884.js new file mode 100644 index 0000000000..cfcdbd8a2e --- /dev/null +++ b/js/src/jit-test/tests/warp/bug1719884.js @@ -0,0 +1,19 @@ +// |jit-test| --fast-warmup; --no-threads + +var always_true = true; +var unused = 3; + +function foo(input, trigger) { + if (trigger) { + return Math.atan2(always_true ? Math.trunc(input ** -0x80000001) + : unused, + +input); + } +} + +with ({}) {} +for (var i = 0; i < 100; i++) { + foo(1, i == 15); +} + +assertEq(foo(-Infinity, true), -Math.PI); |