Skip to content

compiler crash #42

Open
Open
@404Dev-404

Description

@404Dev-404

i was reading the tutorial at https://cognate-lang.github.io/learn/ and tried to compile the code:

Let Even? (Zero? Modulo 2);
Let Evens Filter (Even?) Range 1 100;
Print Evens;

(literally just one of the examples without the lowercase words)

and got an error:

➜  ~ cognac test.cog && ./test
           ______                        ______
          / ____/___  ____ _____  ____ _/ ____/
         / /   / __ \/ __ `/ __ \/ __ `/ /
        / /___/ /_/ / /_/ / / / / /_/ / /___
        \____/\____/\__, /_/ /_/\__,_/\____/
                   /____/
                          Cognate Compiler



          ___  _
         / _ \| |__    _ __   ___
        | | | | '_ \  | '_ \ / _ \
        | |_| | | | | | | | | (_) |
         \___/|_| |_| |_| |_|\___/

        ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR

        The compiler has reached an unreachable state!
        This error is my fault not yours, so give
        yourself a pat on the back for finding a bug
        in the compiler - then submit a bug report!

        To make this easier, I'm including a handy
        backtrace:

cognac(+0x63ad) [0x60d213f263ad]
cognac(push_register_front+0x37) [0x60d213f27341]
cognac(shorten_references+0x3f) [0x60d213f2746f]
cognac(main+0x136) [0x60d213f2d3cf]
/usr/lib/libc.so.6(+0x27488) [0x785777c02488]
/usr/lib/libc.so.6(__libc_start_main+0x8c) [0x785777c0254c]
cognac(_start+0x25) [0x60d213f243a5]


^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^Cc[1]    269180 IOT instruction (core dumped)  cognac test.cog

(the ^Cs are from me trying to quit the compiler)

im running Arch Linux on kernel 6.13.8-zen1-1-zen

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions