Skip to content

'Free regions in optimized MIR' ICE with const generics #100360

Closed
@b-naber

Description

@b-naber

The following throws a 'Free regions in optimized MIR' ICE on master:

Code

#![feature(adt_const_params)]
#![feature(generic_const_exprs)]

fn foo<const B: &'static bool>(arg: &'static bool) -> bool {
  B == arg 
}

fn main() {
  foo::<{&true}>(&false);
}

backtrace.txt

Metadata

Metadata

Labels

C-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