On 15-Jul-05, at 8:18 PM, Sven.Hartrumpf@fernuni-hagen.de wrote:
Hi all.
I managed to isolate a long standing problem for my programs:
cat a.scm
(write (cadar (read)))
gsc a.c gcc344 a.c a_.c -lgambc -lm -lutil -ldl echo "((11 12 13) (21 22 23) (31 32 33))" | a.out
21
The result of the interpreter looks much better: 12
Current beta of Gambit (and before), Linux i386, gcc 3.4.4.
Hope this helps.
Greetings Sven
Oh my... what a stupid mistake!
To fix it you will have to make the following change to gsc/_t- c-2.scm and recompile the compiler (with a "make"). Change the definition
(define (gen-c...r pattern var) (if (< pattern 4) (gen-tst-pair pattern var (new-cst source env #f) check-run-time-binding) (let ((vars (gen-temp-vars source '(#f)))) (new-call source env (gen-prc source env vars (gen-c...r (quotient pattern 2) (car vars))) (list (gen-tst-pair pattern var (new-cst source env #f) #f))))))
to
(define (gen-c...r pattern var) (if (< pattern 4) (gen-tst-pair pattern var (new-cst source env #f) check-run-time-binding) (let ((vars (gen-temp-vars source '(#f)))) (new-call source env (gen-prc source env vars (gen-tst-pair pattern (car vars) (new-cst source env #f) #f)) (list (gen-c...r (quotient pattern 2) var))))))
Marc
Afficher les réponses par date
On Jul 15, 2005, at 4:14 PM, Marc Feeley wrote:
To fix it you will have to make the following change to gsc/_t-c-2.scm and recompile the compiler (with a "make").
Do I have to do "make clean; make" after this step in case the rest of Gambit has been miscompiled by this?
Brad