[gambit-list] compiler bug?

Marc Feeley feeley at iro.umontreal.ca
Mon Sep 25 17:30:57 EDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 25-Sep-06, at 3:48 PM, Sven.Hartrumpf at FernUni-Hagen.de wrote:

> Hello Marc.
>
> I have a large program which behaves a little different
> with gsc than any other Scheme I know of (bigloo, chicken, gauche):
> Here is the problematic region:
>
>         (let* ((orth (and (pair? word-info)
>                           ;(not (eq? (caar word-info) 'words))
>                           (fs-value (car word-info) '(orth))))
>                (orth-l (if orth (string-length orth) 0))
>                (left-hyphen (and (> orth-l 2)
>                                  (char=? (string-ref orth 0) # 
> \-))) ; examples: \quw{Steuergesetzgebung und -verwaltung}, \quw 
> {auspringen und -setzen}
>                (right-hyphen (and (> orth-l 1)
>                                   (char=? (string-ref orth (- orth- 
> l 1)) #\-)))
>                (step (if left-hyphen
>                        (and (not right-hyphen)
>                             -1)
>                        (and right-hyphen
>                             1))))
>
> left-hyphen and right-hyphen are evaluated to #f for some binding -  
> this
> is as expected. But step is bound to 1 which seems wrong to me.
> Minimizing the problem might be hard for me, so I hope that you can  
> see
> the problem already :-)
>
> Ciao
> Sven

Sven, you have just uncovered a nasty bug in the compiler.  In beta  
18 the transformation for the "and" form is too aggressive in the  
case where the second argument is a constant.  As far as I can tell  
this bug was introduced just before beta 18 was released.   
Surprisingly in the 70Kloc in the Gambit runtime system and compiler  
this case does not occur.  I have now fixed the bug and will release  
beta 19 shortly because this is a serious bug.

Thanks!

Marc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iD8DBQFFGEqS//V9Zc2T/v4RAqTeAJ9asp7elGoK7yqa6MzmLFTRj6K8UwCfc3d4
5haROCNvlgMs1NREyZCgYIw=
=bvLI
-----END PGP SIGNATURE-----



More information about the Gambit-list mailing list