Summary
-scrutinize not properly expanding match macro.
Metadata
- Id: 88a9862faafc6d33400acae309aa5eb017055749
- Trac id: 484
- Type: defect
- Reporter: alanpost
- Owner:
- Cc:
- Status: closed
- Component: compiler
- Estimated difficulty:
- Resolution: fixed
- Priority: major
- Milestone: 4.9.0
- Version: 4.6.x
- Changetime: 2012-09-24 21:47:48 UTC
- Created: 2011-01-20 21:56:51 UTC
- Keywords:
Attachments
- 88a9862faafc6d33400acae309aa5eb017055749/attachments/testegg.scm
Description
I've encountered a problem using the match macro while having '-scrutinize' enabled.
I've attached a .scm file that uses the match egg testing four cases. Compiling this file with the following command:
csc -feature compiling-extension -setup-mode -s -scrutinize -j testegg -o testegg.so testegg.scm
Gives me the following error:
Error: (caddr) bad argument type: *
Call history:
<syntax> (##core#let ((g670 ((make-bar "aisa" #f #t) "baz"))) (g670))
<syntax> ((make-bar "aisa" #f #t) "baz")
<syntax> (##core#let ((g672 (make-bar "aisa" #f #t))) (g672 "baz"))
<syntax> (make-bar "aisa" #f #t)
<syntax> (##core#begin (g672 "baz"))
<syntax> (g672 "baz")
<syntax> (##core#begin (g670))
<syntax> (g670)
<syntax> (newline)
<syntax> (##core#undefined) <--
Error: shell command terminated with non-zero exit status 17920: /opt/chicken-master/bin/chicken testegg.scm -output-file testegg.c -dynamic -feature chicken-compile-shared -feature compiling-extension -setup-mode -scrutinize -emit-import-library testegg
This code compiles fine in the following conditions:
- it runs fine in csi, this problem relates to the compiler.
- it runs fine if you comment-out all but one case in match. The particular case doesn't matter, so long as there is only one of them.
- it runs fine without the -scrutinizer command-line option.
I've confirmed this problem on experimental (df0bb192a6ac069e9d845d8445d96bf173e117fa: updated manifest) and 4.6.0. I'm running OpenBSD 4.8. C-Keen has confirmed this problem with Chicken 4.6.0.
Changes and comments
[2011-01-20 21:57:27 UTC] alanpost attached testegg.scm (description=match example that bugs out -scrutinize)
[2011-01-20 22:12:46 UTC] ckeen wrote:
Against my hopes this is not fixed by the specialization branch as of commit 06d7fd21a4651b7850381061c8ad9dc8ea0f5835
[2011-01-21 09:40:29 UTC] felix changed status from new to closed
[2011-01-21 09:40:29 UTC] felix set resolution to fixed
[2011-01-21 09:40:29 UTC] felix wrote:
I have (hopefully) fixed the problem in commit de033ae ("experimental"). It was caused by an incorrectly implemented type-comparison in `scrutinizer.scm`.
Thanks for reporting.
[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