Index: /branches/working-0711/ccl/compiler/X86/x862.lisp
===================================================================
--- /branches/working-0711/ccl/compiler/X86/x862.lisp	(revision 8422)
+++ /branches/working-0711/ccl/compiler/X86/x862.lisp	(revision 8423)
@@ -536,5 +536,6 @@
                           (instruction (x86::make-x86-instruction))
                           (end-code-tag (gensym))
-                          debug-info)
+                          debug-info
+                          debug-info-p)
                      (make-x86-lap-label end-code-tag)
                      (x86-lap-directive frag-list :long `(ash (+ (- (:^ ,end-code-tag ) 8)
@@ -591,6 +592,9 @@
                                  (and *compiler-record-source* *definition-source-note*)
                                  *x862-recorded-symbols*
-                                 (and *compiler-record-source* *x862-emitted-source-notes* *definition-source-note*))
-                         (x86-lap-directive frag-list :quad 0))
+                                 (and *compiler-record-source*
+                                      *x862-emitted-source-notes*
+                                      *definition-source-note*))
+                         (x86-lap-directive frag-list :quad 0)
+                         (setf debug-info-p t))
                        (when fname
                          (x86-lap-directive frag-list :quad 0))
@@ -600,21 +604,20 @@
                        (fill-for-alignment frag-list)
                        (x862-lap-process-regsave-info frag-list regsave-label regsave-mask regsave-addr)
-                       (setf debug-info
-                             (nconc (copy-list (afunc-lfun-info afunc))
-                                    (when lambda-form
-                                      (list 'function-debugging-info lambda-form))
-                                    (when (and *compiler-record-source* *definition-source-note*)
-                                      (list 'function-source-note
-                                            (source-note-to-list *definition-source-note* :form nil :children nil)))
-                                    (when *x862-recorded-symbols*
-                                      (list 'function-symbol-map *x862-recorded-symbols*))
-                                    (when (and *compiler-record-source*
-                                               *x862-emitted-source-notes*
-                                               *definition-source-note*)
-                                      (list 'pc-source-map
-                                            (x862-generate-pc-source-map *definition-source-note*
-                                                                         *x862-emitted-source-notes*)))))
-                       (when debug-info
-                         (setq bits (logior (ash 1 $lfbits-info-bit) bits)))
+                       (when debug-info-p
+                         (setf debug-info
+                               (nconc (copy-list (afunc-lfun-info afunc))
+                                      (when lambda-form
+                                        (list 'function-debugging-info lambda-form))
+                                      (when (and *compiler-record-source* *definition-source-note*)
+                                        (list 'function-source-note
+                                              (source-note-to-list *definition-source-note* :form nil :children nil)))
+                                      (when *x862-recorded-symbols*
+                                        (list 'function-symbol-map (x862-digest-symbols)))
+                                      (when (and *compiler-record-source*
+                                                 *x862-emitted-source-notes*
+                                                 *definition-source-note*)
+                                        (list 'pc-source-map
+                                              (x862-generate-pc-source-map *definition-source-note* *x862-emitted-source-notes*)))))
+                         (setf bits (logior (ash 1 $lfbits-info-bit) bits)))
                        (unless (or fname lambda-form *x862-recorded-symbols*)
                          (setq bits (logior (ash 1 $lfbits-noname-bit) bits)))
@@ -626,6 +629,5 @@
                                (cross-create-x86-function fname frag-list *x862-constant-alist* bits debug-info))
                              #-x86-target
-                             (cross-create-x86-function fname frag-list *x862-constant-alist* bits debug-info))
-                       (x862-digest-symbols))))))
+                             (cross-create-x86-function fname frag-list *x862-constant-alist* bits debug-info)))))))
           (backend-remove-labels))))
     afunc))
