﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	difficulty
571	merging rest-parameter in combination with inlining fails	felix winkelmann	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 '() '())
}}}"	defect	new	critical	4.7.0	compiler	4.6.x				
