local macro definitions and inline functions

Bug #309123 reported by Nikodemus Siivola
2
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Medium
Unassigned

Bug Description

Compilation of the DEFUN QUUX causes "X is unbound" error:

    (symbol-macrolet ((x pi))
      (macrolet ((foo (y) (+ x y)))
        (declaim (inline bar))
        (defun bar (z)
          (* z (foo 4)))))

    (defun quux (z)
      (bar z))

Local macro definitions surrounding inline functions are in the lexical scope for the out of line version (correct) and null environment for the inline versions (incorrect.)

See (COERCE (CDR X) 'FUNCTION) in IR1-CONVERT-INLINE-LAMBDA.

Revision history for this message
Nikodemus Siivola (nikodemus) wrote :

Currently we get a compile-time *warnings* for X being unbound. Need to figure out if that is correct. My brain hurts.

Changed in sbcl:
status: New → Incomplete
Revision history for this message
Nikodemus Siivola (nikodemus) wrote :

See aso bug 309460.

Revision history for this message
Nikodemus Siivola (nikodemus) wrote :

Ignore my earlier comment: this still causes an error, and even to pointer is to the right place.

Changed in sbcl:
importance: Undecided → Medium
status: Incomplete → Confirmed
description: updated
Stas Boukarev (stassats)
Changed in sbcl:
assignee: nobody → Stas Boukarev (stassats)
Revision history for this message
Stas Boukarev (stassats) wrote :

In ad792784dac16d1d4de03afa72cb4e145e6d15bf

Changed in sbcl:
status: Confirmed → Fix Committed
assignee: Stas Boukarev (stassats) → nobody
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.