Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#571 closed defect (fixed)

merging rest-parameter in combination with inlining fails

Reported by: felix winkelmann Owned by: felix winkelmann
Priority: critical Milestone: 4.9.0
Component: compiler Version: 4.6.x
Keywords: Cc:
Estimated difficulty:

Description (last modified by felix winkelmann)

The following code causes a compile-time error. Somehow the calls to fail are incorrectly modified for rest-parameter merging. The output should be "UNBOUND VARIABLE: (foo)", but it is "UNBOUND VARIABLE: foo". This happens with "-O1 -inline".

(define (lisp-eval x a bt)
  (fail bt "UNBOUND VARIABLE" x))

(define (lisp-apply fun args a bt)
  (let ((hd (car fun)))
    (case hd
      ((label)
       (if (= (length fun) 3)
	   (let ((fo (caddr fun)))
	     (lisp-apply fo args (cons (cons (cadr fun) fo) a) bt))
	   (fail bt "INVALID LABEL FORM" fun)))
      (else (lisp-apply (lisp-eval fun a bt) args a bt)))))

(define (error-hook bt msg args)
  (error msg args))

(define (fail bt msg . args)
  (error-hook bt msg args))

(lisp-eval 'foo '() '())

Change History (4)

comment:1 Changed 10 years ago by felix winkelmann

Description: modified (diff)

comment:2 Changed 10 years ago by felix winkelmann

Resolution: fixed
Status: newclosed

A bugfix has been merged into the "master", "experimental" and prerelease" branches.

comment:3 Changed 10 years ago by felix winkelmann

Milestone: 4.7.04.8.0

Milestone 4.7.0 deleted

comment:4 Changed 9 years ago by felix winkelmann

Milestone: 4.8.04.9.0

Milestone 4.8.0 deleted

Note: See TracTickets for help on using tickets.