Skip to content

Panic with a bitwise xor operator #394

Closed

Description

@zhassan-aws

I tried this code:

fn main() {
    let a: bool = __nondet();
    let b: bool = __nondet();
    let c = a ^ b;
    assert!((a == b && !c) || (a != b && c));
}

and it crashed with the following message:

thread 'rustc' panicked at 'BinaryOperation Expression does not typecheck Xor Expr { value: Symbol { identifier: "main::1::var_5" }, typ: CInteger(Bool), location: None } Expr { value: Symbol { identifier: "main::1::var_6" }, typ: CInteger(Bool), location: None }', compiler/rustc_codegen_llvm/src/gotoc/cbmc/goto_program/expr.rs:863:9
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

    [C] BugThis is a bug. Something isn't working.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions