Peter Bex wrote, 2019-06-23 14:51: > On Sun, Jun 23, 2019 at 02:33:10PM +0200, Peter Bex wrote: >> [panic] Low-level type assertion >> C_blockp((C_word)C_VAL1(C__PREV_TMPST.n1))=#t failed at chickenprob3.c:93488 >> - execution terminated > > Here's a minimal reproducible testcase: > > (define (test-it) > (let loop ((done #f)) > (if done > '() > (cons (or (read) 0.0) (loop #t))))) > > (print (test-it)) > > This generates exactly the same construct: > f0=C_flonum_magnitude((C_truep(t1)?t1:lf[1]));
Very good! > If you type in a fixnum integer, this will break too. > > I've filed a bug to track this: https://bugs.call-cc.org/ticket/1624 > > > A quick workaround for your program might be to return the 0.0 from a > foreign lambda, like so: > > (define return-zero > (foreign-lambda* float () "C_return(0.0);")) > > (define (test-it) > (let loop ((done #f)) > (if done > '() > (cons (or (read) (return-zero)) (loop #t))))) > > (print (test-it)) > > It's stupid, but it works. Thanks for the suggestion. I will use another Scheme compiler until this is fixed because there are more cases like this in my (non-reduced) source, if I recall correctly :-) Ciao Sven _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users