summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug878444.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/ion/bug878444.js')
-rw-r--r--js/src/jit-test/tests/ion/bug878444.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/ion/bug878444.js b/js/src/jit-test/tests/ion/bug878444.js
new file mode 100644
index 000000000..4b5e9f66a
--- /dev/null
+++ b/js/src/jit-test/tests/ion/bug878444.js
@@ -0,0 +1,26 @@
+function g()
+{
+ function f(v) {
+ v = +v;
+ var infinity = 0.0;
+ var three = 0.0;
+ var nan = 0.;
+ var result = 0;
+
+ infinity = 1.0 / 0.0;
+ three = v + 2.0;
+ nan = (infinity % three);
+ result = ~~(nan + 42.0);
+
+ return result | 0;
+ }
+ return f
+}
+
+g = g()
+var x;
+for(i=0; i < 20000; ++i)
+{
+ x = g(1.0)
+}
+assertEq(x, 0);