[Ecls-list] compiler bug with SHIFTF

Eric Marsden eric.marsden at free.fr
Sat Nov 1 18:08:53 UTC 2008


Hi,

The session below illustrates a bug in the compiler's handling of
SHIFTF with COERCE. 

This is with ECL on Linux/AMD64, fresh from the git repository (and
not from the CVS repository, which doesn't seem to be up to date).

,----
| ;;; Loading #P"/usr/local/lib/ecl-8.10.0/asdf.fas"
| ;;; Loading #P"/usr/local/lib/ecl-8.10.0/cmp.fas"
| ;;; Loading #P"/usr/local/lib/ecl-8.10.0/sysfun.lsp"
| ECL (Embeddable Common-Lisp) 8.10.0 (CVS 2008-07-12 18:54)
| Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
| Copyright (C) 1993 Giuseppe Attardi
| Copyright (C) 2000 Juan J. Garcia-Ripoll
| 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.
| > (defun foo (x) (coerce (shiftf x 2) 'integer))
| FOO
| > (foo 1)
| 1
| > (compile 'foo)
| ;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
| ;;; End of Pass 1.
| ;;; Note: Replacing variable G128 by its value
| ;;; Note: Invoking external command:
| ;;;   gcc  -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fPIC  -Dlinux -O "-I/usr/local/include/" -w -c "/tmp/ECL001hAtinK.c" -o "/tmp/ECL001hAtinK.o"
| ;;; Note: Invoking external command:
| ;;;   gcc -o "/tmp/ECL001hAtinK.fas" -L"/usr/local/lib/" "/tmp/ECL001hAtinK.o"  -shared    -lecl -ldl  -lm  
| FOO
| NIL
| NIL
| > (foo 1)
| 2
`----

-- 
Eric Marsden





More information about the ecl-devel mailing list