Skip to content

Drop Elaboration debug-ICEs when SimplifyCfg is disabled #160945

Description

@clubby789

#160524 (comment)
When compiling the following with debug assertions:

// rustc ice.rs -Zmir-enable-passes=-SimplifyCfg-initial,-SimplifyCfg-promote-consts,-SimplifyCfg-post-analysis
fn mir_drop<T>(_place: T) {
    panic!()
}

fn main() {
    mir_drop(());
}

We get an ICE in dataflow during drop elaboration:

thread 'rustc' panicked at compiler/rustc_mir_dataflow/src/framework/cursor.rs:120:9:
assertion failed: self.reachable_blocks.contains(block)

Full ICE

Unsure if this is an issue in practice, but there does seem to be some implicit dependencies between passes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-mir-optArea: MIR optimizationsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️requires-debug-assertionsThis issue requires a build of rustc or tooling with debug-assertions in some way

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions