michael@0: michael@0: /* Make sure ints are converted to doubles as needed at the head of loops which modify those ints. */ michael@0: michael@0: function bar() {} michael@0: michael@0: function foo() { michael@0: var n = 0.5; michael@0: n -= 0.5; michael@0: var iters = 0; michael@0: for (var i = n;; ) { michael@0: bar(); michael@0: iters++; michael@0: if (i == 100) michael@0: break; michael@0: i = (i + 1) | 0; michael@0: } michael@0: assertEq(iters, 101); michael@0: } michael@0: foo();