Index: /trunk/ccl/compiler/optimizers.lisp
===================================================================
--- /trunk/ccl/compiler/optimizers.lisp	(revision 5515)
+++ /trunk/ccl/compiler/optimizers.lisp	(revision 5516)
@@ -1569,5 +1569,7 @@
                    type)))  
     (if (= 2 (length subscripts))
-      (setq call `(%aref2 ,a ,(car subscripts) ,(cadr subscripts))))
+      (setq call `(%aref2 ,a ,@subscripts))
+      (if (= 3 (length subscripts))
+        (setq call `(%aref3 ,a ,@subscripts))))
     (if useful
       `(the ,useful ,call)
@@ -1577,6 +1579,8 @@
 (define-compiler-macro aset (&whole call a &rest subs&val)
   (if (= 3 (length subs&val))
-    `(%aset2 ,a ,(car subs&val) ,(cadr subs&val) ,(caddr subs&val))
-    call))
+    `(%aset2 ,a ,@subs&val)
+    (if (= 4 (length subs&val))
+      `(%aset3 ,a ,@subs&val)
+      call)))
 
 
