[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] Bugs associated with type propagation through the THE operat

From: Paul F. Dietz
Subject: [Gcl-devel] Bugs associated with type propagation through the THE operator
Date: Fri, 24 Dec 2004 15:11:39 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041217

I've written a special-purpose random test harness for type propagation
through integer operators.  See ansi-tests/random-type-prop.lsp for this

Running the test harness on various integer operators caused a series
of failures.  The failures occured when one or more of the arguments
to a binary (or higher arity) function was a (THE ...) form.

The tests have been added to misc.lsp.  A copy of the new tests
is included below.  These may all reflect the same bug.  I suspect
the bug will also show up with other integer operators, but these
are probably more than enough for now.


;;; gcl 24 Dec 2004
;;; Incorrect results (these may all be related)
;;; These are also produced by the special purpose tester in 

(deftest misc.467
   (compile nil '(lambda (p2 p3)
                   (declare (optimize speed (safety 1))
                            (type (integer -990888631320) p2)
                            (type (integer -20346 -19755) p3))
                   (+ -77 (the (integer * -990888630255) p2) p3)))
   -990888630272 -19756)

(deftest misc.468
   (compile nil '(lambda (p2 p3)
                   (declare (optimize speed (safety 1))
                            (type (integer * 151075404030) p2)
                            (type (integer 6515518 *) p3))
                   (- 12967657127936 (the (eql 151075403520) p2)
                      (the (member 6515658 -14) p3))))
   151075403520 6515658)

(deftest misc.469
   (compile nil '(lambda (p2)
                   (declare (optimize speed (safety 1)) (type integer p2))
                   (+ 30926 (the (integer -4025987543018 *) p2))))

(deftest misc.470
   (compile nil '(lambda (p2)
                   (declare (optimize speed (safety 1))
                            (type (integer 3689224658939 *) p2))
                   (+ -1071 (the (integer * 3689229115390) p2))))

(deftest misc.471
   (compile nil '(lambda (p1 p2)
                   (declare (optimize speed (safety 1))
                            (type (integer -9024844 230253450) p1)
                            (type (eql 35716681856) p2))
                   (* p1 (the (integer * 35716681856) p2))))
   -9024809 35716681856)

(deftest misc.472
   (compile nil '(lambda (p1 p2)
                   (declare (optimize speed (safety 1))
                            (type (integer -785238 -80) p1)
                            (type (eql -523213622272) p2))
                   (min p1 (the integer p2))))
   -259 -523213622272)

(deftest misc.473
   (compile nil '(lambda (p2)
                   (declare (optimize speed (safety 1))
                            (type (integer * 65861934352) p2))
                   (max 23939 (the (integer 64863825609 65878336765) p2))))

(deftest misc.474
   (compile nil '(lambda (p1)
                   (declare (optimize speed (safety 1))
                            (type (integer -6750156308) p1))
                   (logand (the signed-byte p1) -540165229)))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]