Paul Foley | 11 Jun 14:16
X-Face

Compiler bug (?)

Attempting to compile the following function generates an error

  Error in function LISP::ASSERT-ERROR:
    The assertion (NULL (KERNEL:ARGS-TYPE-REQUIRED C::ATYPE)) failed.
    [Condition of type SIMPLE-ERROR]

[It doesn't /do/ anything; it's part of a much larger function
generated by a series of macros - I've stripped it down to apparently
the minimum necessary to trigger the problem; remove anything more,
including unused code branches, etc., and it compiles fine]

(defun compiler-bug ()
  (MULTIPLE-VALUE-BIND (A B)
      (the (values (or (unsigned-byte 32) null) fixnum)
        (MULTIPLE-VALUE-BIND (C D)
            (values 109 1)
          (LET ((E '(1 2)))
            (LOOP
              (UNLESS (CDDR E) (RETURN (VALUES 2 1)))
              (MULTIPLE-VALUE-BIND (F G)
                  (values nil 1)
                (IF (NULL F)
                    (RETURN (VALUES (CADR E) 1))
                    (LET ((H nil))
                      (IF t
                          nil
                          (SETQ E H)))))))))
    A))

--

-- 
Tact is the ability to tell a man he has an open mind when he has a
hole in his head.

(setq reply-to
  (concatenate 'string "Paul Foley " "<mycroft" '(#\@) "actrix.gen.nz>"))


Gmane