0.7.5.15:
[sbcl.git] / tests / compiler.impure.lisp
index a1e239b..55f003a 100644 (file)
 (eval '(foo-2002-05-13))
 (compile 'foo-2002-05-13)
 (foo-2002-05-13) ; (The bug caused UNDEFINED-FUNCTION to be signalled here.)
+
+;;; floating point pain on the PPC.
+;;;
+;;; This test case used to fail to compile on most powerpcs prior to
+;;; sbcl-0.7.4.2x, as floating point traps were being incorrectly
+;;; masked.
+(defun floating-point-pain (x)
+  (declare (single-float x))
+  (log x))
+
+;;; bug found and fixed ca. sbcl-0.7.5.12: The INTERSECTION-TYPE
+;;; here satisfies "is a subtype of ARRAY-TYPE", but can't be
+;;; accessed with ARRAY-TYPE accessors like
+;;; ARRAY-TYPE-SPECIALIZED-ELEMENT-TYPE, so ARRAY-related
+;;; DEFTRANSFORMs died with TYPE-ERROR at compile time when
+;;; compiling the DEFUN here.
+(defun stupid-input-to-smart-array-deftransforms-0-7-5-12 (v)
+  (declare (type (and simple-vector fwd-type-ref) v))
+  (aref v 0))
 \f
 ;;;; tests not in the problem domain, but of the consistency of the
 ;;;; compiler machinery itself