Skip to content

assertion failed: offset < min_length in GVN #118992

Closed
@saethlin

Description

@saethlin
fn main() {
    let slf = "f".as_bytes();
    let _n = slf[slf.len() - 2];
}

Compile with

-Zmir-opt-level=1 -Zmir-enable-passes=+GVN -Zinline-mir

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-mir-optArea: MIR optimizationsC-bugCategory: This is a bug.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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions