Skip to content

LLVM Assertion: Both operands to ICmp instruction are not of the same type! #23311

Closed

Description

@seanmonstar

Unfortunately, I don't know what in hyper is causing this error.

rustc: /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/llvm/include/llvm/IR/Instructions.h:997: void llvm::ICmpInst::AssertOK(): Assertion `getOperand(0)->getType() == getOperand(1)->getType() && "Both operands to ICmp instruction are not of the same type!"' failed.

Activity

  1. seanmonstar commented on Mar 12, 2015

    @seanmonstar
    ContributorAuthor

    Nevermind, I found it. Using an array pattern in a match against a slice:

    fn main() {
        match "foo".as_bytes() {
            b"food" => println!("nom nom"),
            [b'f', ..] => println!("f!"),
            _ => ()
        }
    }
  2. added
    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
    on Mar 17, 2015
  3. frewsxcv commented on Aug 20, 2015

    @frewsxcv
    Contributor

    Visiting for triage: this is still an issue

  4. bltavares commented on Oct 31, 2015

    @bltavares
    Contributor

    Still ICE. Updated minimal test case:

    #![feature(slice_patterns)]
    
    fn main() {
        match "foo".as_bytes() {
            b"food" => println!("nom nom"),
            [b'f', ..] => println!("f!"),
            _ => ()
        }
    }
  5. added a commit that references this issue on Oct 31, 2015
  6. bluss commented on Jan 8, 2017

    @bluss
    Contributor

    Does not ICE anymore

  7. added
    E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.
    on Jan 9, 2017
  8. frewsxcv commented on Mar 11, 2017

    @frewsxcv
    Contributor

    Fixed by #40296

  9. added a commit that references this issue on Apr 23, 2018
  10. added a commit that references this issue on Sep 14, 2026
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.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