Skip to content

LLVM assertion "Ptr must be a pointer to Val type!" failed. #6470

Description

@ILyoan

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions