Is this a bug in ecl?
% cat test.lisp
(defvar v1 nil)
(defun run-test () (let ((share_t) (fst 'a)) (format t "fst ~S~%" fst) (multiple-value-bind (v1 fst) (case share_t ((nil) (values v1 fst))) (format t "fst ~S~%" fst)))) % ecl ECL (Embeddable Common-Lisp) 16.1.2 (git:UNKNOWN) Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya Copyright (C) 1993 Giuseppe Attardi Copyright (C) 2000 Juan J. Garcia-Ripoll Copyright (C) 2015 Daniel Kochmanski ECL is free software, and you are welcome to redistribute it under certain conditions; see file 'Copyright' for details. Type :h for Help. Top level in: #<process TOP-LEVEL>.
(compile-file "test.lisp")
;;; Loading #P"/u/gildea/lib/ecl-16.1.2/cmp.fas" ;;; ;;; Compiling test.lisp. ;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0 ;;; ;;; Compiling (DEFVAR V1 ...). ;;; Compiling (DEFUN RUN-TEST ...). ;;; End of Pass 1. ;;; Emitting code for RUN-TEST. ;;; Finished compiling test.lisp. ;;; #P"/tmp/test.fas" NIL NIL
(load "test.fas")
;;; Loading "/tmp/test.fas" #P"/tmp/test.fas"
(run-test)
fst A fst NIL NIL
(run-test)
fst A fst A NIL
On Tue, March 15, 2016 at 12:15AM, Robert Dodier wrote:
On 2016-03-14, Dan Gildea dgildea@users.sourceforge.net wrote:
The testsuite is not working at all for me with ecl. It seems to be a problem with the multiple-value-bind in run-testsuite.
When I try run_testsuite(), every test fails with "Caused an error break".
After load(mload), then run_testsuite() works OK. This makes me think it's a difference between compiled and interpreted code -- i.e. a bug in ECL's compiler.
I'm working with ECL 16.1.2 at the moment. At some point in the not-too-distant past, run_testsuite() did work. I don't know if the current behavior is a result of a change in ECL or in Maxima. I guess that MULTIPLE-VALUE-BIND is a recent change in src/mload.lisp so maybe it is now tickling a bug that existed before. Dunno for sure.
best
Robert Dodier
Hello,
yes, it is a bug in ECL. Thanks for the report. I've added it to the issue tracker: https://gitlab.com/embeddable-common-lisp/ecl/issues/233
Problem is present in the earlier versions of the ECL as well (verified with ECL 13.5.1), so it's not a regression.
Best regards, Daniel
Dan Gildea writes:
Is this a bug in ecl?
% cat test.lisp
(defvar v1 nil)
(defun run-test () (let ((share_t) (fst 'a)) (format t "fst ~S~%" fst) (multiple-value-bind (v1 fst) (case share_t ((nil) (values v1 fst))) (format t "fst ~S~%" fst)))) % ecl ECL (Embeddable Common-Lisp) 16.1.2 (git:UNKNOWN) Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya Copyright (C) 1993 Giuseppe Attardi Copyright (C) 2000 Juan J. Garcia-Ripoll Copyright (C) 2015 Daniel Kochmanski ECL is free software, and you are welcome to redistribute it under certain conditions; see file 'Copyright' for details. Type :h for Help. Top level in: #<process TOP-LEVEL>.
(compile-file "test.lisp")
;;; Loading #P"/u/gildea/lib/ecl-16.1.2/cmp.fas" ;;; ;;; Compiling test.lisp. ;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0 ;;; ;;; Compiling (DEFVAR V1 ...). ;;; Compiling (DEFUN RUN-TEST ...). ;;; End of Pass 1. ;;; Emitting code for RUN-TEST. ;;; Finished compiling test.lisp. ;;; #P"/tmp/test.fas" NIL NIL
(load "test.fas")
;;; Loading "/tmp/test.fas" #P"/tmp/test.fas"
(run-test)
fst A fst NIL NIL
(run-test)
fst A fst A NIL
On Tue, March 15, 2016 at 12:15AM, Robert Dodier wrote:
On 2016-03-14, Dan Gildea dgildea@users.sourceforge.net wrote:
The testsuite is not working at all for me with ecl. It seems to be a problem with the multiple-value-bind in run-testsuite.
When I try run_testsuite(), every test fails with "Caused an error break".
After load(mload), then run_testsuite() works OK. This makes me think it's a difference between compiled and interpreted code -- i.e. a bug in ECL's compiler.
I'm working with ECL 16.1.2 at the moment. At some point in the not-too-distant past, run_testsuite() did work. I don't know if the current behavior is a result of a change in ECL or in Maxima. I guess that MULTIPLE-VALUE-BIND is a recent change in src/mload.lisp so maybe it is now tickling a bug that existed before. Dunno for sure.
best
Robert Dodier