[Ecls-list] BUG: incorrect interpretation of compound type specifiers in compiler

Eric Marsden eric.marsden at free.fr
Sat Nov 12 12:10:59 UTC 2011


Hi,

The following illustrates a bug in the handling of compound type
specifiers in the compiler. The byte-compiler handles them correctly.

,----
| ECL (Embeddable Common-Lisp) 11.1.1 (git:ea0fdff00734051a1c775c2740ddb2a92122e93c)
| > (lambda (a) (declare (type (cons t (cons * t)) a)) a)
| #<bytecompiled-closure #<bytecompiled-function 00000000030a5050>>
| > (compile nil *)
| ;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
| ;;;
| ;;; Note:
| ;;;   In function G0, checking types of arguments A.
| ;;; Warning:
| ;;;   ! Unsupported CONS type (CONS T (CONS * T)). Replacing it with T.
| ;;; End of Pass 1.
| ;;; Note:
| ;;;   Invoking external command:
| ;;;   gcc -I. -I/usr/local/include/ -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fPIC -D_THREAD_SAFE -Dlinux -O2 -w -c /tmp/ecl001TA8gBJ.c -o /tmp/ecl001TA8gBJ.o 
| ;;; Note:
| ;;;   Invoking external command:
| ;;;   gcc -o /tmp/ecl001TA8gBJ.fas -L/usr/local/lib/ /tmp/ecl001TA8gBJ.o -Wl,--rpath,/usr/local/lib/ -shared -lecl -lgmp -lpthread -ldl -lm 
| #<compiled-function 000000000320ed40>
| T
| NIL
| > (funcall * (cons 1 (cons 2 3)))
| * Condition of type: SIMPLE-ERROR
| * is not a valid type specifier.
`----

-- 
Eric Marsden





More information about the ecl-devel mailing list