Skip to content

LLVM Assertion Error #30891

Closed
Closed
@ExPixel

Description

@ExPixel

Getting an LLVM assertion error on nightly inside of a macro. The error doesn't occur on stable.

The error:

Assertion failed: (C1->getType() == C2->getType() && "Operand types in binary constant expression should match"), function get, file /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/llvm/lib/IR/Constants.cpp, line 1875.

const ERROR_CONST: bool = false;

macro_rules! cause_llvm_assertion_error {
    ($a: expr, $b: expr, $c: expr) => (
        if $a || $b || !($c) {
            println!("assertion error?");
        }
    )
}

pub fn main() {
    cause_llvm_assertion_error!(true, false, ERROR_CONST);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions