Wrong macroexpansion in loop (shared with clasp)
Describe the problem here.
(macroexpand '(LOOP FOR X FROM 1 to 4.0 COLLECT X)) (BLOCK NIL (LET ((X 1)) (DECLARE (TYPE SINGLE-FLOAT X)) (SI::WITH-LOOP-LIST-COLLECTION-HEAD (#:LOOP-LIST-HEAD1 #:LOOP-LIST-TAIL2) (SI::LOOP-BODY NIL (NIL NIL NIL NIL) ((SI::LOOP-COLLECT-RPLACD (#:LOOP-LIST-HEAD1 #:LOOP-LIST-TAIL2) (LIST X))) (NIL (SI::LOOP-REALLY-DESETQ X (SI::LOOP-UNSAFE (1+ X))) (WHEN (> X '4.0) (GO SI::END-LOOP)) NIL) ((RETURN-FROM NIL (SI::LOOP-COLLECT-ANSWER #:LOOP-LIST-HEAD1)))))))
The problem is that the declaration (DECLARE (TYPE SINGLE-FLOAT X)) is wrong.
If the compiler is treating declarations as something to be verified at run time, this throws as error
sbcl gives (DECLARE (TYPE (AND REAL NUMBER) X)) which seem ok, sicl simply type t
Provide details regarding ECL version (or preferably commit), operating system and if revelant the build options and versions of the build tools.
(lisp-implementation-version) (ext:lisp-implementation-vcs-id)` (software-type) (software-version) (machine-type) *features* "16.1.3" > "c9ea2b151d892fd69a471b8b0adf2bb8b16fb8f2" > (SOFTWARE-TYPE) > "18.2.0" > "x86_64" > (:WALKER :CDR-1 :CDR-5 :DARWIN :FORMATTER :CDR-7 :ECL-WEAK-HASH :LITTLE-ENDIAN :ECL-READ-WRITE-LOCK :LONG-LONG :UINT64-T :UINT32-T :UINT16-T :LONG-FLOAT :UNICODE :DFFI :CLOS-STREAMS :CMU-FORMAT :UNIX :ECL-PDE :DLOPEN :CLOS :THREADS :BOEHM-GC :ANSI-CL :COMMON-LISP :IEEE-FLOATING-POINT :PACKAGE-LOCAL-NICKNAMES :CDR-14 :PREFIXED-API :FFI :X86_64 :COMMON :ECL)
As said this error is shared with clasp. CCL, sbcl, allegro and sicl loop work fine