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

alt discriminant of type bang -> "Ptr must be a pointer to Val type!" #794

Closed
jruderman opened this issue Aug 2, 2011 · 3 comments
Closed

Comments

@jruderman
Copy link
Contributor

fn f() -> ! { fail }
fn g() -> int { alt f() { true { 1 } false { 0 } }; }
fn main() { g(); }

Assertion failed: (getOperand(0)->getType() == cast(getOperand(1)->getType())->getElementType() && "Ptr must be a pointer to Val type!"), function AssertOK, file Instructions.cpp, line 968.

Maybe the same as issue #777

@marijnh
Copy link
Contributor

marijnh commented Aug 2, 2011

What response would you prefer here? Compile and work, or error out in the typechecker?

@jruderman
Copy link
Contributor Author

The fuzzer would be happy either way.

@ghost ghost assigned catamorphism Aug 2, 2011
@catamorphism
Copy link
Contributor

This should compile and work (well, fail at runtime). f() has type _|_ and so it should be usable in any context.

keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
bump to 0.2.32

- add DCCP constant definitions
- add clock_gettime related functions to macOS
- add fstatat64 on linux/android
- add preadv64/pwritev64 on linux/android
- add utimensat on solaris, netbsd and openbsd
- add IP_BINDANY on freebsd
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
* Move `volatile_store` and ensure alignment

* Create util function for concurrency warnings

* Add positive and negative test cases

* Emit concurrency warning with macro
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