Skip to content

"alt ret" hits an error in llvm: "cast<Ty>() argument of incompatible type!" #769

New issue

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

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

Already on GitHub? # to your account

Closed
jruderman opened this issue Jul 29, 2011 · 2 comments
Closed

Comments

@jruderman
Copy link
Contributor

fn a() -> int { alt ret 1 { 2 { 3 } } }
fn main() { a(); }

Assertion failed: (isa(Val) && "cast() argument of incompatible type!"), function cast, file llvm/include/llvm/Support/Casting.h, line 194.

@msullivan
Copy link
Contributor

For me it now fails with

Basic Block in function '_ZN1aE' does not have terminator!
label %5
LLVM ERROR: Broken module, no Basic Block terminator!

without optimization and works with optimization.

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

Will fix this, looks similar to the bug I fixed this morning.

arielb1 pushed a commit to arielb1/rust that referenced this issue Apr 10, 2015
keeperofdakeys pushed a commit to keeperofdakeys/rust that referenced this issue Dec 12, 2017
[Redox] add net functions, fcntl, and close

This adds net functions and two file functions: fcntl and close.

It also adds related constants.

The net functions are in a separate file for better organization.
pdietl pushed a commit to pdietl/rust that referenced this issue Apr 23, 2020
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
* Initial commit for adding custom log1p

* WIP

* WIP

* Fix weird segfault

* WIP

* Prev fixup

Co-authored-by: Leila Ghaffari <Leila.Ghaffari@colorado.edu>
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
…ion context (`CurrentFnCtx`) (rust-lang#769)

- Populate the `BasicBlock` labels for the current function *while* creating the current function context to avoid the need for a follow-up call to set the labels

- Removed the method that returns all the labels from the current function context (`labels`), and replaced calls to it with calls to the `find_label` method
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants