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

nil in native hits LLVM assert "Invalid cast!" #901

Closed
jruderman opened this issue Sep 11, 2011 · 1 comment
Closed

nil in native hits LLVM assert "Invalid cast!" #901

jruderman opened this issue Sep 11, 2011 · 1 comment

Comments

@jruderman
Copy link
Contributor

native "cdecl" mod libc = "" {
    fn f(x: ());
}
fn main() { }

fails in LLVM:

Assertion failed: (castIsValid(op, S, Ty) && "Invalid cast!"), function Create, file Instructions.cpp, line 2226.
@marijnh
Copy link
Contributor

marijnh commented Sep 13, 2011

I don't think this is supposed to be allowed (you can only pass word-sized things to natives). I agree we should catch it with a proper error message.

@brson brson closed this as completed in 0b43bf9 Feb 6, 2012
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
* Add noalias preservation to unwrap

* Fixup

* ix up
coastalwhite pushed a commit to coastalwhite/rust that referenced this issue Aug 5, 2023
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
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