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

LLVM assertion when using immediate values with self by-value #6636

Closed
luqmana opened this issue May 20, 2013 · 1 comment
Closed

LLVM assertion when using immediate values with self by-value #6636

luqmana opened this issue May 20, 2013 · 1 comment
Labels
I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

Comments

@luqmana
Copy link
Member

luqmana commented May 20, 2013

Using self by-value with immediate values seems to cause an LLVM assertion. Ran into this while working on #6612.

trait Fooable {
    fn yes(self);
}

impl Fooable for int {
    fn yes(self) {
        io::println("Yes");
    }   
}

fn main() {
    21.yes();
}
-> % rustc bar.rs
rustc: /scratch/laden/rust3/src/llvm/lib/IR/Instructions.cpp:2394: static llvm::CastInst* llvm::CastInst::CreatePointerCast(llvm::Value*, llvm::Type*, const llvm::Twine&, llvm::Instruction*): Assertion `S->getType()->isPtrOrPtrVectorTy() && "Invalid cast"' failed.
[1]    601 abort      rustc bar.rs
@jdm
Copy link
Contributor

jdm commented May 20, 2013

Same as #5321.

@jdm jdm closed this as completed May 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
Projects
None yet
Development

No branches or pull requests

2 participants