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

Check types of inputs in inline asm statements #8774

Closed
notYuriy opened this issue May 14, 2021 · 1 comment
Closed

Check types of inputs in inline asm statements #8774

notYuriy opened this issue May 14, 2021 · 1 comment
Milestone

Comments

@notYuriy
Copy link

https://zig.godbolt.org/z/5P7WEeb4a

pub fn main() void {
    asm volatile("nop;"::[_]"{rax}"(u1));
}

Crashes zig compiler in resolve_llvm_types function

Unreachable at /home/vsts/work/1/s/src/stage1/analyze.cpp:9711 in resolve_llvm_types. This is a bug in the Zig compiler.thread 1 panic: 
Unable to dump stack trace: debug info stripped
ASM generation compiler returned: 139
Unreachable at /home/vsts/work/1/s/src/stage1/analyze.cpp:9711 in resolve_llvm_types. This is a bug in the Zig compiler.thread 1 panic: 
Unable to dump stack trace: debug info stripped
Execution build compiler returned: 139

Zig compiler should check what types are passed as inputs to inline asm statements and give an error if those types are compile-time only.

@g-w1
Copy link
Contributor

g-w1 commented May 14, 2021

Dupe of #7843

@ifreund ifreund added this to the 0.8.0 milestone May 14, 2021
@ifreund ifreund closed this as completed May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants