Hi Jörg,

On Mon, 15 Jun 2015 17:35:07 +0200 "Jörg F. Wittenberger" 
<[email protected]> wrote:

> The attached test case works in csi but fails in csc.
>
> Possibly related to optimization options.  Compile as:
>
> csc  -O3 -clustering -no-argc-checks -no-procedure-checks
> -no-bound-checks -no-trace -no-lambda-info -specialize -lfa2
> -strict-types -disable-stack-overflow-checks -unsafe test-failing.scm
>
> to see it terminate with exit code 1.
>
> BTW: I'd have expected the assert (not (foo? "a b")) to kick in, but
> this does not happen.
>
> Sorry, no clue, no patch.

I can reproduce the problem you report.  Looks like it is caused by
-strict-types:

$ ~/local/chicken-4.9.0.1/bin/csc -O3 -strict-types -unsafe test-failing.scm
$ ./test-failing
$ echo $?
0

$ ~/local/chicken-master-clang/bin/csc -O3 -strict-types -unsafe 
test-failing.scm
$ ./test-failing
$ echo $?
1

And it seems that -unsafe is causing the assertion to "pass":

$ ~/local/chicken-master-clang/bin/csc -O3 -strict-types test-failing.scm
$ ./test-failing

Error: (test-failing.scm:17) assertion failed: (not (foo? "a b"))

        Call history:

        test-failing.scm:16: foo?
        test-failing.scm:7: loop
        test-failing.scm:17: foo?
        test-failing.scm:7: loop
        test-failing.scm:7: loop
        test-failing.scm:7: loop
        test-failing.scm:17: ##sys#error                <--

                
Best wishes.
Mario
-- 
http://parenteses.org/mario

_______________________________________________
Chicken-hackers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to