[Ecls-list] Bug?
Nicolas Neuss
neuss at scipolis.de
Tue Mar 19 10:36:21 UTC 2013
Nicolas Neuss <neuss at scipolis.de> writes:
> Hello,
>
> I am trying to make my PDE solver Femlisp work on ECL again. At the
> moment ECL cannot compile the following code (which should make #d(...)
> construct a double-float vector):
>
> (eval-when (:compile-toplevel :load-toplevel :execute)
> (set-dispatch-macro-character
> #\# #\d ; dispatch on #d for double-vec
> #'(lambda (stream char n)
> (declare (ignore char n))
> (let ((list (read stream nil (values) t)))
> `(coerce ',list '(simple-array double-float (*)))))))
>
> (IIRC, the code has worked in some previous version of ECL.)
More precisely, if I create a file "ecl-bug.lisp" containing
--8<---------------cut here---------------start------------->8---
(in-package :cl-user)
(eval-when (:compile-toplevel :load-toplevel :execute)
(set-dispatch-macro-character
#\# #\d ; dispatch on #d for double-vec
#'(lambda (stream char n)
(declare (ignore char n))
(let ((list (read stream nil (values) t)))
`(coerce ',list '(simple-array double-float (*)))))))
--8<---------------cut here---------------end--------------->8---
I observe the following:
> (compile-file "ecl-bug.lisp")
;;;
;;; Compiling ecl-bug.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
;;; End of Pass 1.
;;; Emitting code for #:G0.
;;; Internal error:
;;; in file ecl-bug.lisp, position 21
;;; at (SET-DISPATCH-MACRO-CHARACTER # ...)
;;; ** In function STRUCTURE-REF, the value of the first argument is
;;; NIL
;;; which is not of the expected type C1FORM
NIL
T
T
More information about the ecl-devel
mailing list