[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] mathh failure with csc -optimize-level 3
From: |
Kon Lovett |
Subject: |
Re: [Chicken-users] mathh failure with csc -optimize-level 3 |
Date: |
Sun, 15 Jan 2017 11:40:18 -0800 |
> On Jan 15, 2017, at 4:12 AM, Peter Bex <address@hidden> wrote:
>
> On Sat, Jan 14, 2017 at 10:17:14PM -0500, Robert Altenburg wrote:
>> Is this a bug that others can replicate? Any idea what's going on?
>
> Hello Robert,
>
> This looks like either a bug in the "mathh" egg, or a bug in
> CHICKEN that's triggered by the mathh egg.
>
> The .inline file that mathh installs contains this code:
>
> (mathh#gamma
> (##core#lambda
> (f_684 #t (k685 double176179) 12)
> (let (g178180)
> (##core#inline_allocate ("C_a_i_bytevector" 6) '(4))
> (let (r688)
> (##core#inline
> ("C_i_foreign_flonum_argumentp")
> (##core#variable (double176179)))
> (##core#call
> (#t)
> (##core#variable (k685))
> (##core#inline
> (stub177)
> (##core#variable (g178180))
> (##core#variable (r688))))))))
>
> But the stub isn't defined anywhere. Maybe Kon (the egg's maintainer)
> can shed some light on how this is supposed to work?
Yes, I wondered about stub177. Here is the scheme call & mathh definition:
(use mathh)
(define (factorial x)
(gamma (+ 1 x)) )
(factorial 9)
---
(define gamma
(cond-expand
(windows (lambda-unimplemented 'gamma) )
(linux (foreign-lambda double "tgamma" double) )
(macosx (foreign-lambda double "tgamma" double) )
(else (foreign-lambda double "gamma" double) ) ) )
Um, not my stub. At least not explicitly.
>
> Cheers,
> Peter