From: Kevin L
Subject: CMUCL compile failure:  "NIL is not of type C::CONTINUATION"
Date: 
Message-ID: <pOWcg.7257$qn2.5888@trnddc04>
Hi all,

At (declaim (optimize (safety 3))), the following code breaks in compile
under CMUCL.  It works fine in SBCL 0.8.16.

I'm using Debian stable, cmucl is version 19a-release-20040728-11 .  I
get the same error on a user-compiled CMUCL 19c.

It breaks like so:

---snip---

$ lisp
; Loading #p"/home/kevinl/.cmucl-init".
CMU Common Lisp CVS release-19a 19a-release-20040728 + minimal debian
patches, running on whisper
With core: /usr/lib/cmucl/lisp.core
Dumped on: Tue, 2006-05-16 04:48:46-05:00 on whisper
For support see http://www.cons.org/cmucl/support.html Send bug reports
to the debian BTS.
or to ········@debian.org
type (help) for help, (quit) to exit, and (demo) to see the demos

Loaded subsystems:
    Python 1.1, target Intel x86
    CLOS based on Gerd's PCL 2004/04/14 03:32:47
* (compile-file "test2.lisp")

; Python version 1.1, VM version Intel x86 on 24 MAY 06 05:25:57 am.
; Compiling: /home/kevinl/lisp/test2.lisp 24 MAY 06 05:12:48 am

; Byte Compiling Top-Level Form:
; Byte Compiling Top-Level Form:
; Converted SET-LOG-LEVEL.
; Compiling DEFUN SET-LOG-LEVEL:
; Byte Compiling Top-Level Form:
; Compiling DEFCLASS LOGGER:
; Compiling Load Time Value of (PCL::ENSURE-ACCESSOR 'PCL::READER
                                         '(PCL:SLOT-ACCESSOR :GLOBAL
SPEC ...)
                                         ...):
; Compiling Load Time Value of (PCL::ENSURE-ACCESSOR 'PCL::READER
                                         '(PCL:SLOT-ACCESSOR :GLOBAL
SPEC ...)
                                         ...):
; Compiling Load Time Value of (PCL::ENSURE-ACCESSOR 'PCL::READER
                                         '(PCL:SLOT-ACCESSOR :GLOBAL
SPEC ...)
                                         ...):
; Compiling Load Time Value of (PCL::ENSURE-ACCESSOR 'PCL::READER
                                         '(PCL:SLOT-ACCESSOR :GLOBAL
SPEC ...)
                                         ...):
; Compiling DEFMETHOD LOG-MSG (STRING T T T T):
; Compiling Top-Level Form:
; Converted LOG-EMERGENCY.
; Compiling DEFMACRO LOG-EMERGENCY:
; Converted LOG-ALERT.
; Compiling DEFMACRO LOG-ALERT:
; Converted LOG-CRITICAL.
; Compiling DEFMACRO LOG-CRITICAL:
; Converted LOG-ERROR.
; Compiling DEFMACRO LOG-ERROR:
; Converted LOG-WARNING.
; Compiling DEFMACRO LOG-WARNING:
; Byte Compiling Top-Level Form:
; Converted LOG-NOTIFY.
; Compiling DEFMACRO LOG-NOTIFY:
; Converted LOG-INFO.
; Compiling DEFMACRO LOG-INFO:
; Converted LOG-DEBUG1.
; Compiling DEFMACRO LOG-DEBUG1:
; Converted LOG-DEBUG2.
; Compiling DEFMACRO LOG-DEBUG2:
; Converted LOG-DEBUG3.
; Compiling DEFMACRO LOG-DEBUG3:
; Converted LOG-ENTER.
; Compiling DEFMACRO LOG-ENTER:
; Byte Compiling Top-Level Form:
; Converted LOG-EXIT.
; Compiling DEFMACRO LOG-EXIT:
; Converted LOG-CAUGHT-ERROR.
; Compiling DEFUN LOG-CAUGHT-ERROR:
Type-error in KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER:
   NIL is not of type C::CONTINUATION
   [Condition of type TYPE-ERROR]

Restarts:
  0: [ABORT] Return to Top-Level.

Debug  (type H for help)

(C::FIND-PUSHED-CONTINUATIONS #<C::CBLOCK Start = c1 {585205CD}>)
Source:
; File: target:compiler/stack.lisp
(NODE-BLOCK DEST)
0] (quit)

; Compilation unit aborted.

---snip---

If the code is interpreted it works fine:

---snip---

$ lisp -quiet -load test2.lisp
; Loading #p"/home/kevinl/.cmucl-init".
[2006-05-24 10:23:42] I hello
*

---snip---

It breaks DIFFERENTLY at debug level less than 3:

---snip---

[ ... omitted compile messages ... ]

; Byte Compiling DEFUN LOG-CAUGHT-ERROR:

Error in function LISP::ASSERT-ERROR:
   The assertion (EQ (CAR C::STACK) C::CONT) failed.
   [Condition of type SIMPLE-ERROR]

Restarts:
  0: [CONTINUE] Retry assertion.
  1: [ABORT   ] Return to Top-Level.

Debug  (type H for help)

(LISP::ASSERT-ERROR (EQ (CAR C::STACK) C::CONT) NIL NIL)
Source:
; File: target:code/macros.lisp
(RESTART-CASE (ERROR COND) (CONTINUE NIL :REPORT (LAMBDA # #) NIL))
0]

---snip---

Here is the code:

---snip---

(declaim (optimize
	  (safety 3)
	  (speed 0)
	  (debug 3)
	  (compilation-speed 0)))

;;; Global objects
(defconstant +log-level-emergency+ 0)
(defconstant +log-level-alert+ 1)
(defconstant +log-level-critical+ 2)
(defconstant +log-level-error+ 3)
(defconstant +log-level-warning+ 4)
(defconstant +log-level-notify+ 5)
(defconstant +log-level-info+ 6)
(defconstant +log-level-debug1+ 10)
(defconstant +log-level-debug2+ 11)
(defconstant +log-level-debug3+ 12)
(defconstant +log-level-enter+ 20)
(defconstant +log-level-exit+ 21)
(defparameter *log-level* +log-level-info+)

;;; Implementation

(defun set-log-level (level)
  "Sets global logging level"
  (declare (type integer level))
  (setf *log-level* level))

(defclass logger ()
  ((spec :initarg :spec)
   (level :initarg :level :initform *log-level*)))

(defgeneric log-msg (() tagchar stdout stderr msg))

;; Cache the timestamp -- this improves performance quite a bit when
;; there are a lot of debugging messages.
(let ((cached-timestamp "")
      (cached-time 0))
  (declare (type string cached-timestamp))
  (declare (type integer cached-time))

  (defmethod log-msg ((logger logger) tagchar stdout stderr msg)
    "Logging method for logging class, which includes PID and spec."
    (declare (type string tagchar))

    (let ((currenttime -1) (threadid 0))
      (declare (type integer currenttime))
      (declare (type (signed-byte 32) threadid))
      (setf currenttime (get-universal-time))
      (if (not (= currenttime cached-time))
	  (progn
	    (setf cached-time currenttime)
	    ;; Generate timestamp
	    (multiple-value-bind
		(second minute hour day-of-month month year)
		(decode-universal-time currenttime 0)
	      (setf cached-timestamp (format nil "~4,'0D-~2,'0D-~2,'0D
~2,'0D:~2,'0D:~2,'0D"
				      year month day-of-month hour minute second)))))

      ;; Get current thread/process ID
      ;; Wow, easy support for multiple implementations!
      #+:CMU
      (setf threadid (unix:unix-getpid))
      (if stdout
	  (progn
	    (if (> (length (slot-value logger 'spec)) 0)
		(format *standard-output* "[~a] ~6,'0D ~a " cached-timestamp threadid
			(slot-value logger 'spec)))
	    (format *standard-output* " ~a " tagchar)
	    (apply #'format *standard-output* msg)
	    (format *standard-output* "~%")))
      (if stderr
	  (progn
	    (if (> (length (slot-value logger 'spec)) 0)
		(format *error-output* "[~a] ~6,'0D ~a " cached-timestamp threadid
			(slot-value logger 'spec)))
	    (format *error-output* " ~a " tagchar)
	    (apply #'format *error-output* msg)
	    (format *error-output* "~%")))))

  (defmethod log-msg ((string string) tagchar stdout stderr msg)
    "General logging method with only timestamp and message."
    (declare (type string tagchar))

    (let ((currenttime -1))
      (declare (type integer currenttime))
      (setf currenttime (get-universal-time))
      (if (not (= currenttime cached-time))
	  (progn
	    (setf cached-time currenttime)
	    ;; Generate timestamp
	    (multiple-value-bind
		(second minute hour day-of-month month year)
		(decode-universal-time currenttime 0)
	      (setf cached-timestamp (format nil "~4,'0D-~2,'0D-~2,'0D
~2,'0D:~2,'0D:~2,'0D"
					     year month day-of-month hour minute second)))))

      (if stdout
	  (progn
	    (format *standard-output* "[~a] ~a " cached-timestamp tagchar)
	    (apply #'format *standard-output* (append (list string) msg))
	    (format *standard-output* "~%")))
      (if stderr
	  (progn
	    (format *error-output* "[~a] ~a " cached-timestamp tagchar)
	    (apply #'format *error-output* (append (list string) msg))
	    (format *error-output* "~%")))))
  )

(defmacro log-emergency (string &rest msg)
  `(if (<= +log-level-emergency+ *log-level*)
       (apply #'log-msg (list ,string "EMERGENCY" t t (list ,@msg)))))
(defmacro log-alert (string &rest msg)
  `(if (<= +log-level-alert+ *log-level*)
       (apply #'log-msg (list ,string "ALERT" t t (list ,@msg)))))
(defmacro log-critical (string &rest msg)
  `(if (<= +log-level-critical+ *log-level*)
       (apply #'log-msg (list ,string "!" t t (list ,@msg)))))
(defmacro log-error (string &rest msg)
  `(if (<= +log-level-error+ *log-level*)
       (apply #'log-msg (list ,string "E" t t (list ,@msg)))))
(defmacro log-warning (string &rest msg)
  `(if (<= +log-level-warning+ *log-level*)
       (apply #'log-msg (list ,string "W" t nil (list ,@msg)))))
(defmacro log-notify (string &rest msg)
  `(if (<= +log-level-notify+ *log-level*)
       (apply #'log-msg (list ,string "N" t nil (list ,@msg)))))
(defmacro log-info (string &rest msg)
  `(if (<= +log-level-info+ *log-level*)
       (apply #'log-msg (list ,string "I" t nil (list ,@msg)))))
(defmacro log-debug1 (string &rest msg)
  `(if (<= +log-level-debug1+ *log-level*)
       (apply #'log-msg (list ,string "D1" t nil (list ,@msg)))))
(defmacro log-debug2 (string &rest msg)
  `(if (<= +log-level-debug2+ *log-level*)
       (apply #'log-msg (list ,string "D2" t nil (list ,@msg)))))
(defmacro log-debug3 (string &rest msg)
  `(if (<= +log-level-debug3+ *log-level*)
       (apply #'log-msg (list ,string "D3" t nil (list ,@msg)))))
(defmacro log-enter (string &rest msg)
  `(if (<= +log-level-enter+ *log-level*)
       (apply #'log-msg (list ,string ">" t nil (list ,@msg)))))
(defmacro log-exit (string &rest msg)
  `(if (<= +log-level-exit+ *log-level*)
       (apply #'log-msg (list ,string "<" t nil (list ,@msg)))))

;; Special functions for logging errors
(defun log-caught-error (logger lisp-error)
  (log-error logger
	     (apply #'format
		    (append (list nil (cl:simple-condition-format-control lisp-error))
			    (cl:simple-condition-format-arguments lisp-error)))))

(log-info "hello")

---snip---

From: Paul F. Dietz
Subject: Re: CMUCL compile failure:  "NIL is not of type C::CONTINUATION"
Date: 
Message-ID: <4474E84E.7030501@dls.net>
The gcl random tester stimulates this bug on cmucl quite quickly,
and the test suite has some examples as tests (in gcl's ansi-tests/misc.lsp).

Alas, there has not been anyone to fix it.

	Paul

Kevin L wrote:
> Hi all,
> 
> At (declaim (optimize (safety 3))), the following code breaks in compile
> under CMUCL.  It works fine in SBCL 0.8.16.
> 
> I'm using Debian stable, cmucl is version 19a-release-20040728-11 .  I
> get the same error on a user-compiled CMUCL 19c.
> 
> It breaks like so:
> 
> ---snip---
> 
> $ lisp
> ; Loading #p"/home/kevinl/.cmucl-init".
> CMU Common Lisp CVS release-19a 19a-release-20040728 + minimal debian
> patches, running on whisper
> With core: /usr/lib/cmucl/lisp.core
> Dumped on: Tue, 2006-05-16 04:48:46-05:00 on whisper
> For support see http://www.cons.org/cmucl/support.html Send bug reports
> to the debian BTS.
> or to ········@debian.org
> type (help) for help, (quit) to exit, and (demo) to see the demos
> 
> Loaded subsystems:
>     Python 1.1, target Intel x86
>     CLOS based on Gerd's PCL 2004/04/14 03:32:47
> * (compile-file "test2.lisp")
> 
> ; Python version 1.1, VM version Intel x86 on 24 MAY 06 05:25:57 am.
> ; Compiling: /home/kevinl/lisp/test2.lisp 24 MAY 06 05:12:48 am
> 
> ; Byte Compiling Top-Level Form:
> ; Byte Compiling Top-Level Form:
> ; Converted SET-LOG-LEVEL.
> ; Compiling DEFUN SET-LOG-LEVEL:
> ; Byte Compiling Top-Level Form:
> ; Compiling DEFCLASS LOGGER:
> ; Compiling Load Time Value of (PCL::ENSURE-ACCESSOR 'PCL::READER
>                                          '(PCL:SLOT-ACCESSOR :GLOBAL
> SPEC ...)
>                                          ...):
> ; Compiling Load Time Value of (PCL::ENSURE-ACCESSOR 'PCL::READER
>                                          '(PCL:SLOT-ACCESSOR :GLOBAL
> SPEC ...)
>                                          ...):
> ; Compiling Load Time Value of (PCL::ENSURE-ACCESSOR 'PCL::READER
>                                          '(PCL:SLOT-ACCESSOR :GLOBAL
> SPEC ...)
>                                          ...):
> ; Compiling Load Time Value of (PCL::ENSURE-ACCESSOR 'PCL::READER
>                                          '(PCL:SLOT-ACCESSOR :GLOBAL
> SPEC ...)
>                                          ...):
> ; Compiling DEFMETHOD LOG-MSG (STRING T T T T):
> ; Compiling Top-Level Form:
> ; Converted LOG-EMERGENCY.
> ; Compiling DEFMACRO LOG-EMERGENCY:
> ; Converted LOG-ALERT.
> ; Compiling DEFMACRO LOG-ALERT:
> ; Converted LOG-CRITICAL.
> ; Compiling DEFMACRO LOG-CRITICAL:
> ; Converted LOG-ERROR.
> ; Compiling DEFMACRO LOG-ERROR:
> ; Converted LOG-WARNING.
> ; Compiling DEFMACRO LOG-WARNING:
> ; Byte Compiling Top-Level Form:
> ; Converted LOG-NOTIFY.
> ; Compiling DEFMACRO LOG-NOTIFY:
> ; Converted LOG-INFO.
> ; Compiling DEFMACRO LOG-INFO:
> ; Converted LOG-DEBUG1.
> ; Compiling DEFMACRO LOG-DEBUG1:
> ; Converted LOG-DEBUG2.
> ; Compiling DEFMACRO LOG-DEBUG2:
> ; Converted LOG-DEBUG3.
> ; Compiling DEFMACRO LOG-DEBUG3:
> ; Converted LOG-ENTER.
> ; Compiling DEFMACRO LOG-ENTER:
> ; Byte Compiling Top-Level Form:
> ; Converted LOG-EXIT.
> ; Compiling DEFMACRO LOG-EXIT:
> ; Converted LOG-CAUGHT-ERROR.
> ; Compiling DEFUN LOG-CAUGHT-ERROR:
> Type-error in KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER:
>    NIL is not of type C::CONTINUATION
>    [Condition of type TYPE-ERROR]
> 
> Restarts:
>   0: [ABORT] Return to Top-Level.
> 
> Debug  (type H for help)
> 
> (C::FIND-PUSHED-CONTINUATIONS #<C::CBLOCK Start = c1 {585205CD}>)
> Source:
> ; File: target:compiler/stack.lisp
> (NODE-BLOCK DEST)
> 0] (quit)
> 
> ; Compilation unit aborted.
> 
> ---snip---
> 
> If the code is interpreted it works fine:
> 
> ---snip---
> 
> $ lisp -quiet -load test2.lisp
> ; Loading #p"/home/kevinl/.cmucl-init".
> [2006-05-24 10:23:42] I hello
> *
> 
> ---snip---
> 
> It breaks DIFFERENTLY at debug level less than 3:
> 
> ---snip---
> 
> [ ... omitted compile messages ... ]
> 
> ; Byte Compiling DEFUN LOG-CAUGHT-ERROR:
> 
> Error in function LISP::ASSERT-ERROR:
>    The assertion (EQ (CAR C::STACK) C::CONT) failed.
>    [Condition of type SIMPLE-ERROR]
> 
> Restarts:
>   0: [CONTINUE] Retry assertion.
>   1: [ABORT   ] Return to Top-Level.
> 
> Debug  (type H for help)
> 
> (LISP::ASSERT-ERROR (EQ (CAR C::STACK) C::CONT) NIL NIL)
> Source:
> ; File: target:code/macros.lisp
> (RESTART-CASE (ERROR COND) (CONTINUE NIL :REPORT (LAMBDA # #) NIL))
> 0]
> 
> ---snip---
> 
> Here is the code:
> 
> ---snip---
> 
> (declaim (optimize
> 	  (safety 3)
> 	  (speed 0)
> 	  (debug 3)
> 	  (compilation-speed 0)))
> 
> ;;; Global objects
> (defconstant +log-level-emergency+ 0)
> (defconstant +log-level-alert+ 1)
> (defconstant +log-level-critical+ 2)
> (defconstant +log-level-error+ 3)
> (defconstant +log-level-warning+ 4)
> (defconstant +log-level-notify+ 5)
> (defconstant +log-level-info+ 6)
> (defconstant +log-level-debug1+ 10)
> (defconstant +log-level-debug2+ 11)
> (defconstant +log-level-debug3+ 12)
> (defconstant +log-level-enter+ 20)
> (defconstant +log-level-exit+ 21)
> (defparameter *log-level* +log-level-info+)
> 
> ;;; Implementation
> 
> (defun set-log-level (level)
>   "Sets global logging level"
>   (declare (type integer level))
>   (setf *log-level* level))
> 
> (defclass logger ()
>   ((spec :initarg :spec)
>    (level :initarg :level :initform *log-level*)))
> 
> (defgeneric log-msg (() tagchar stdout stderr msg))
> 
> ;; Cache the timestamp -- this improves performance quite a bit when
> ;; there are a lot of debugging messages.
> (let ((cached-timestamp "")
>       (cached-time 0))
>   (declare (type string cached-timestamp))
>   (declare (type integer cached-time))
> 
>   (defmethod log-msg ((logger logger) tagchar stdout stderr msg)
>     "Logging method for logging class, which includes PID and spec."
>     (declare (type string tagchar))
> 
>     (let ((currenttime -1) (threadid 0))
>       (declare (type integer currenttime))
>       (declare (type (signed-byte 32) threadid))
>       (setf currenttime (get-universal-time))
>       (if (not (= currenttime cached-time))
> 	  (progn
> 	    (setf cached-time currenttime)
> 	    ;; Generate timestamp
> 	    (multiple-value-bind
> 		(second minute hour day-of-month month year)
> 		(decode-universal-time currenttime 0)
> 	      (setf cached-timestamp (format nil "~4,'0D-~2,'0D-~2,'0D
> ~2,'0D:~2,'0D:~2,'0D"
> 				      year month day-of-month hour minute second)))))
> 
>       ;; Get current thread/process ID
>       ;; Wow, easy support for multiple implementations!
>       #+:CMU
>       (setf threadid (unix:unix-getpid))
>       (if stdout
> 	  (progn
> 	    (if (> (length (slot-value logger 'spec)) 0)
> 		(format *standard-output* "[~a] ~6,'0D ~a " cached-timestamp threadid
> 			(slot-value logger 'spec)))
> 	    (format *standard-output* " ~a " tagchar)
> 	    (apply #'format *standard-output* msg)
> 	    (format *standard-output* "~%")))
>       (if stderr
> 	  (progn
> 	    (if (> (length (slot-value logger 'spec)) 0)
> 		(format *error-output* "[~a] ~6,'0D ~a " cached-timestamp threadid
> 			(slot-value logger 'spec)))
> 	    (format *error-output* " ~a " tagchar)
> 	    (apply #'format *error-output* msg)
> 	    (format *error-output* "~%")))))
> 
>   (defmethod log-msg ((string string) tagchar stdout stderr msg)
>     "General logging method with only timestamp and message."
>     (declare (type string tagchar))
> 
>     (let ((currenttime -1))
>       (declare (type integer currenttime))
>       (setf currenttime (get-universal-time))
>       (if (not (= currenttime cached-time))
> 	  (progn
> 	    (setf cached-time currenttime)
> 	    ;; Generate timestamp
> 	    (multiple-value-bind
> 		(second minute hour day-of-month month year)
> 		(decode-universal-time currenttime 0)
> 	      (setf cached-timestamp (format nil "~4,'0D-~2,'0D-~2,'0D
> ~2,'0D:~2,'0D:~2,'0D"
> 					     year month day-of-month hour minute second)))))
> 
>       (if stdout
> 	  (progn
> 	    (format *standard-output* "[~a] ~a " cached-timestamp tagchar)
> 	    (apply #'format *standard-output* (append (list string) msg))
> 	    (format *standard-output* "~%")))
>       (if stderr
> 	  (progn
> 	    (format *error-output* "[~a] ~a " cached-timestamp tagchar)
> 	    (apply #'format *error-output* (append (list string) msg))
> 	    (format *error-output* "~%")))))
>   )
> 
> (defmacro log-emergency (string &rest msg)
>   `(if (<= +log-level-emergency+ *log-level*)
>        (apply #'log-msg (list ,string "EMERGENCY" t t (list ,@msg)))))
> (defmacro log-alert (string &rest msg)
>   `(if (<= +log-level-alert+ *log-level*)
>        (apply #'log-msg (list ,string "ALERT" t t (list ,@msg)))))
> (defmacro log-critical (string &rest msg)
>   `(if (<= +log-level-critical+ *log-level*)
>        (apply #'log-msg (list ,string "!" t t (list ,@msg)))))
> (defmacro log-error (string &rest msg)
>   `(if (<= +log-level-error+ *log-level*)
>        (apply #'log-msg (list ,string "E" t t (list ,@msg)))))
> (defmacro log-warning (string &rest msg)
>   `(if (<= +log-level-warning+ *log-level*)
>        (apply #'log-msg (list ,string "W" t nil (list ,@msg)))))
> (defmacro log-notify (string &rest msg)
>   `(if (<= +log-level-notify+ *log-level*)
>        (apply #'log-msg (list ,string "N" t nil (list ,@msg)))))
> (defmacro log-info (string &rest msg)
>   `(if (<= +log-level-info+ *log-level*)
>        (apply #'log-msg (list ,string "I" t nil (list ,@msg)))))
> (defmacro log-debug1 (string &rest msg)
>   `(if (<= +log-level-debug1+ *log-level*)
>        (apply #'log-msg (list ,string "D1" t nil (list ,@msg)))))
> (defmacro log-debug2 (string &rest msg)
>   `(if (<= +log-level-debug2+ *log-level*)
>        (apply #'log-msg (list ,string "D2" t nil (list ,@msg)))))
> (defmacro log-debug3 (string &rest msg)
>   `(if (<= +log-level-debug3+ *log-level*)
>        (apply #'log-msg (list ,string "D3" t nil (list ,@msg)))))
> (defmacro log-enter (string &rest msg)
>   `(if (<= +log-level-enter+ *log-level*)
>        (apply #'log-msg (list ,string ">" t nil (list ,@msg)))))
> (defmacro log-exit (string &rest msg)
>   `(if (<= +log-level-exit+ *log-level*)
>        (apply #'log-msg (list ,string "<" t nil (list ,@msg)))))
> 
> ;; Special functions for logging errors
> (defun log-caught-error (logger lisp-error)
>   (log-error logger
> 	     (apply #'format
> 		    (append (list nil (cl:simple-condition-format-control lisp-error))
> 			    (cl:simple-condition-format-arguments lisp-error)))))
> 
> (log-info "hello")
> 
> ---snip---
From: Raymond Toy
Subject: Re: CMUCL compile failure:  "NIL is not of type C::CONTINUATION"
Date: 
Message-ID: <sxd3beyltx1.fsf@rtp.ericsson.se>
>>>>> "Kevin" == Kevin L <Kevin> writes:

[snip]

    Kevin> (declaim (optimize
    Kevin> 	  (safety 3)
    Kevin> 	  (speed 0)
    Kevin> 	  (debug 3)
    Kevin> 	  (compilation-speed 0)))

It's known that various combinations of optimize settings cause
problems in the compiler.  The default settings compile your code
fine, and usually has good enough debug and safety for me.

Do you really need safety 3 and debug 3?

Ray, who's too stupid to fix these compiler bugs
From: Fred Gilham
Subject: Re: CMUCL compile failure:  "NIL is not of type C::CONTINUATION"
Date: 
Message-ID: <u7odxmc85n.fsf@snapdragon.csl.sri.com>
Kevin L <······@nowhere.com> writes:

> Hi all,
>
> At (declaim (optimize (safety 3))), the following code breaks in compile
> under CMUCL.  It works fine in SBCL 0.8.16.

By doing a "binary search" on the code I discovered the problem is the
top level macro call at the end.


If you want a work-around, replacing

(log-info "hello")

with

(defun startup ()
  (log-info "hello"))

(startup)


makes it work.

Perhaps this can also help someone track down the problem.

-- 
Fred Gilham                                  ······@csl.sri.com
The spam folder --- you will never find a more wretched hive of scum
and villainy.  We must be cautious.