Skip to content

ICE caused by LLVM assertion: Assertion `S->getType()->isPtrOrPtrVectorTy() && "Invalid cast"' #24098

Closed
@Valloric

Description

@Valloric

I was updating some code to rust beta and have just hit this roadblock when trying to run tests:

rustc: /home/rustbuild/src/rust-buildbot/slave/beta-dist-rustc-linux/build/src/llvm/lib/IR/Constants.cpp:1622: static llvm::Constant* llvm::ConstantExpr::getPointerCast(llvm::Constant*, llvm::Type*): Assertion `S->getType()->isPtrOrPtrVectorTy() && "Invalid cast"' failed.
Aborted (core dumped)

Repro steps:

  1. Checkout this commit.
  2. Run ./test.sh from the top-level repo dir.

I tried minimizing the code by hand for a smaller test case, but failed.

Version: rustc 1.0.0-beta (9854143cb 2015-04-02) (built 2015-04-02)
OS: OS X Yosemite 10.10.2 (14C1514)

Seems related to: #19748, #19826

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions