Opened 4 years ago
Closed 4 years ago
#1758 closed defect (fixed)
Rest-argument optimization related internal compiler error
Reported by: | Idiomdrottning | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 5.3 |
Component: | compiler | Version: | 5.2.0 |
Keywords: | optimizer | Cc: | |
Estimated difficulty: |
Description
mdg extension is in brev egg and also depends on match-generics egg
(import mdg (chicken base))
(define (pairup lis) lis)
(define (pairup (a b . rest))
(cons (list a b) (pairup rest)))
(print (pairup '(a b c d e f g h)))
;; on -O2, prints ((a b) (c d) (e f) (g h))
;; on -O3, Error: [internal compiler error] Unknown rest op node class in while converting to closure. This shouldn't happen!: ##core#rest-null?
Change History (8)
comment:1 Changed 4 years ago by
comment:3 Changed 4 years ago by
Replying to Idiomdrottning:
That doesn't crash for me though.
Interesting. What options, csc version is that?
I'm using -O3
and Version 5.2.1 (rev ea32b1d0)
.
comment:4 Changed 4 years ago by
Component: | unknown → compiler |
---|---|
Keywords: | optimizer added |
Milestone: | someday → 5.3 |
Summary: | internal compiler error → Rest-argument optimization related internal compiler error |
comment:5 Changed 4 years ago by
ellen% csc -version
csc -version
CHICKEN
(c) 2008-2020, The CHICKEN Team
(c) 2000-2007, Felix L. Winkelmann
Version 5.2.0 (rev 317468e4)
linux-unix-gnu-x86-64 [ 64bit dload ptables ]
comment:7 Changed 4 years ago by
This was just a typo. Patch pending:
core.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core.scm b/core.scm index 85ccc649..5ca76d1d 100644 --- a/core.scm +++ b/core.scm @@ -2668,7 +2668,7 @@ (transform (make-node '##core#inline (list "C_i_list_ref") (list rest-var (qnode (second params)))) here closure)) - ((##core#rest-null) + ((##core#rest-null?) (transform (make-node '##core#inline (list "C_i_greater_or_equal_p")
comment:8 Changed 4 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Somewhat reduced: