Closed
Description
Compiling this code yield LLVM assertion "Ptr must be a pointer to Val type!"
pub mod Bar {
pub struct Foo {
v: int,
}
extern {
#[rust_stack]
pub fn foo(v: *Foo) -> Foo;
}
}
fn main() { }
rustc: /home/ilyoan/project/rust/rust/src/llvm/lib/IR/Instructions.cpp:1084: void llvm::StoreInst::AssertOK(): Assertion `getOperand(0)->getType() == cast(getOperand(1)->getType())->getElementType() && "Ptr must be a pointer to Val type!"' failed.