Summary
merging rest-parameter in combination with inlining fails
Metadata
- Id: b782e9f08ee6663bcbdaae5b6ba789455fe93e37
- Trac id: 571
- Type: defect
- Reporter: felix
- Owner: felix
- Cc:
- Status: closed
- Component: compiler
- Estimated difficulty:
- Resolution: fixed
- Priority: critical
- Milestone: 4.9.0
- Version: 4.6.x
- Changetime: 2012-09-24 21:47:48 UTC
- Created: 2011-05-01 02:11:29 UTC
- Keywords:
Description
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 '() '())
Changes and comments
[2011-05-01 02:11:52 UTC] felix changed description
[2011-05-02 12:48:32 UTC] felix changed status from new to closed
[2011-05-02 12:48:32 UTC] felix set resolution to fixed
[2011-05-02 12:48:32 UTC] felix wrote:
A bugfix has been merged into the "master", "experimental" and prerelease" branches.
[2011-06-01 09:00:41 UTC] felix changed milestone from 4.7.0 to 4.8.0
[2011-06-01 09:00:41 UTC] felix wrote:
Milestone 4.7.0 deleted
[2012-09-24 21:47:48 UTC] felix changed milestone from 4.8.0 to 4.9.0
[2012-09-24 21:47:48 UTC] felix wrote:
Milestone 4.8.0 deleted