Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segmentation fault with compile_if and an inline function let argument #143

Open
undisbeliever opened this issue Jun 9, 2022 · 0 comments

Comments

@undisbeliever
Copy link
Contributor

wiz crashes with a segmentation fault if I use a compile_if attribute that references an inline func's let argument.


(6502 platform)

bank code     @ 0x8000  : [constdata; 0x8000];

in code {

inline func f(let v : u8) {
    #[compile_if(v != 0)] {
        a += v;
    }
}

func test() {
    f(12);
}

}

wiz output:

> ~/repo/snes/unnamed-snes-game/wiz/bin/wiz --system 6502 -o /tmp/wiz.bin bug.wiz 
* wiz: version 0.1.2 (alpha)
>> Parsing...
>> Compiling...
zsh: segmentation fault (core dumped)  ~/repo/snes/unnamed-snes-game/wiz/bin/wiz --system 6502 -o /tmp/wiz.bin 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant