EOF
expect_clean_compile $tmpfilename
+# This shouldn't fail because it's not really a multiple definition
+cat > $tmpfilename <<EOF
+ (in-package :cl-user)
+ (eval-when (:compile-toplevel :load-toplevel :execute)
+ (defun foo (x) x))
+EOF
+expect_clean_compile $tmpfilename
+
+# Likewise
+cat > $tmpfilename <<EOF
+ (in-package :cl-user)
+ (eval-when (:compile-toplevel)
+ (defun foo (x) x))
+ (defun foo (x) x)
+EOF
+expect_clean_compile $tmpfilename
+
# This shouldn't fail despite the apparent type mismatch, because of
# the NOTINLINE declamation.
cat > $tmpfilename <<EOF
EOF
expect_clean_compile $tmpfilename
+# This shouldn't fail, but did until sbcl-0.8.10.4x
+cat > $tmpfilename <<EOF
+ (in-package :cl-user)
+ (declaim (inline foo))
+ (defun foo (x)
+ (1+ x))
+ (defun bar (y)
+ (list (foo y) (if (> y 1) (funcall (if (> y 0) #'foo #'identity) y))))
+EOF
+expect_clean_compile $tmpfilename
+
# This shouldn't fail despite the apparent type mismatch, because of
# the NOTINLINE declaration.
cat > $tmpfilename <<EOF
EOF
expect_failed_compile $tmpfilename
+# This should fail, and fail nicely -- not eg. loop trying to dump
+# references to the unbound variable.
+cat > $tmpfilename <<EOF
+(defmacro macro-with-unbound-variables (foo)
+ \`(print ,bar))
+
+(macro-with-unbound-variables 'xxx)
+EOF
+expect_failed_compile $tmpfilename
+
+# This should fail, as the MAKE-LOAD-FORM must be used for
+# externalizing conditions, and the method for CONDITION must signal
+# an error.
+cat > $tmpfilename <<EOF
+(defvar *oops* #.(make-condition 'condition))
+EOF
+expect_failed_compile $tmpfilename
+
+# This should fail, as the MAKE-LOAD-FORM must be used for objects,
+# and the method for STANDARD.OBJECT is required to signal an error.
+cat > $tmpfilename <<EOF
+(defvar *oops* #.(make-instance 'standard-object))
+EOF
+expect_failed_compile $tmpfilename
+
+# This should be clean
+cat > $tmpfilename <<EOF
+(defvar *string* (make-string 10 :element-type 'base-char))
+EOF
+expect_clean_compile $tmpfilename
+
+# This should style-warn (but not warn or otherwise fail) as the call
+# to FORMAT has too many arguments, which is bad style but not
+# otherwise fatal.
+cat > $tmpfilename <<EOF
+(defun foo (a b)
+ (format nil "abc~~def" a b))
+EOF
+expect_warned_compile $tmpfilename
+
rm $tmpfilename
rm $compiled_tmpfilename