Fix test for invalid fixnum quotient optimization.

The test depended on fixnum width, which is not portable.

original commit: 5efaa004f0541b5562400be822bfdeb6f89aa9bc
This commit is contained in:
Vincent St-Amour 2013-01-29 16:15:00 -05:00
parent 02ad4095fa
commit 7c8cb9a476

View File

@ -1,11 +1,11 @@
#;
(
TR missed opt: invalid-fxquotient.rkt 10:21 (quotient fixnum-min -1) -- out of fixnum range
#f
#t
)
#lang typed/racket/base
(define: fixnum-min : Nonpositive-Fixnum (assert (- (expt 2 30)) fixnum?))
(define: q : Natural (quotient fixnum-min -1)) ; this can't be optimized safely
(fixnum? q) ; should return #f
(= 1073741824 q)