source: trunk/abcl/t/compiler-stack-inconsistency.lisp

Last change on this file was 15222, checked in by Mark Evenson, 4 years ago

Test for progn compiler inconsistency
(Eric Marsden)

Bug revealed by using ABCL to host SBCL compilation.

<https://mailman.common-lisp.net/pipermail/armedbear-devel/2019-December/004022.html>

File size: 948 bytes
Line 
1(in-package :cl-user)
2
3(prove:plan 1)
4
5(defun two-arg-fn (one two)
6 (format t "Two args: ~S and ~S~%" one two))
7
8(prove:ok 
9 (let ((fn (compile nil '(lambda ()
10                          (two-arg-fn
11                           (block test-block
12                             (unwind-protect
13                                  30
14                               (return-from test-block 8)))
15                           -1)))))
16   (let ((result (funcall fn)))
17     (values
18      (not result)
19      result)))
20 (format nil "Checking for successfull compilation of two argument function
"))
21
22(prove:plan 1)
23(let* ((file (asdf:system-relative-pathname :abcl "t/eg/progn-compiler-inconsistency.lisp"))
24       (fasl (compile-file file)))
25  (prove:ok
26   (handler-case
27       (load fasl)
28     (error (e)
29       (format *standard-output* "Failed to load fasl: ~a~%" e)
30       nil))
31   "(ash 1343225879 (- 1)) should compile to a constant"))
32
33(prove:finalize)
34
35
36 
Note: See TracBrowser for help on using the repository browser.