Subject: Re: bug#12182: guile 2.0.6: "Value out of range: 0" when compiling a procedure

From: [email-masked] (Ludovic Courtès)
Date: Sat, 24 Nov 2012 00:19:32 +0100

Hi,

Sorry for the late reply.

Feufochmar <[email-masked]> skribis:

> $ guild compile test.scm
> Backtrace:
> In language/tree-il/optimize.scm:
>   44: 19 [optimize! #<tree-il (lambda () #)> #<module (#{ g40}#) 2097ab0> ...]
> In language/tree-il/cse.scm:
>  537: 18 [visit #<tree-il (lambda () (lambda-case #))> #<vlist ()> ...]
>  543: 17 [visit #<tree-il (lambda-case (# #))> #<vhash 22cf540 1 pairs> ...]
>  483: 16 [visit #<tree-il #> #<vhash 22cf540 1 pairs> #<vlist ()> ...]
>  537: 15 [visit #<tree-il (lambda (#) (lambda-case #))> #<vhash 22cf540 1 pairs> ...]
>  543: 14 [visit #<tree-il (lambda-case (# #))> #<vhash 22cf4a0 2 pairs> ...]
>  429: 13 [visit #<tree-il (let # # # ...)> #<vhash 22cf4a0 2 pairs> #<vlist ()> ...]
>  370: 12 [lp (#<tree-il (lambda () #)>) () #<vlist ()>]
>  537: 11 [visit #<tree-il (lambda () (lambda-case #))> #<vhash 22cf4a0 2 pairs> ...]
>  543: 10 [visit #<tree-il (lambda-case (# #))> #<vhash 22cf400 3 pairs> ...]
>  437: 9 [visit #<tree-il (letrec* # # ...)> #<vhash 22cf400 3 pairs> ...]
>  533: 8 [visit #<tree-il (apply # # ...)> #<vhash 23250e0 19 pairs> ...]
>  370: 7 [lp (#<tree-il #> #<tree-il #> #<tree-il #> #<tree-il #>) () #<vlist ()>]
>  533: 6 [visit #<tree-il (apply # #)> #<vhash 23250e0 19 pairs> ...]
>  370: 5 [lp (#<tree-il (if # # #)>) () #<vlist ()>]
>  403: 4 [return #<tree-il (if # # #)> #<vlist ()>]
>  333: 3 [find-dominating-lexical #<tree-il (if # # ...)> 0 ...]
>  315: 2 [unroll #<vhash 23250e0 19 pairs> 19 13]
> In ice-9/vlist.scm:
>  303: 1 [vlist-ref #<vhash 23250e0 19 pairs> 19]
> In ice-9/boot-9.scm:
>  106: 0 [#<procedure 204f280 at ice-9/boot-9.scm:97:6 (thrown-k . args)> out-of-range ...]
>
> ice-9/boot-9.scm:106:20: In procedure #<procedure 204f280 at ice-9/boot-9.scm:97:6 (thrown-k . args)>:
> ice-9/boot-9.scm:106:20: Value out of range: 0

This is the same issue as 12883, which is now fixed in the stable-2.0
branch (will be in 2.0.7):

  http://git.savannah.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=2c7b7e0f214be5ec5184949a94209668775f60bc

Thanks,
Ludo’.