Skip to content

LLVM ERROR: example-calendar.rs with dump-mir, -Zpolymorphize and debug assertions #90191

Open

Description

Code

Note that in order to reproduce this, you need a rustc build with debug assertions enabled!

Code: https://github.com/rust-lang/rust/blob/master/src/test/ui/impl-trait/example-calendar.rs

Meta

rustc --version --verbose:

rustc 1.58.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.58.0-dev
LLVM version: 13.0.0

rustc @ 0119879

Error output

rustc ./src/test/ui/impl-trait/example-calendar.rs -Zdump-mir=all -Zpolymorphize=on

Both operands to ICmp instruction are not of the same type!
  %18 = icmp ule %"core::iter::adapters::chain::Chain<core::option::IntoIter<alloc::string::String>, core::iter::adapters::map::Map<core::iter::adapters::map::Map<GroupBy<core::iter::adapters::peekable::Peekable<InGroup<core::iter::adapters::peekable::Peekable<InGroup<core::ops::range::RangeFrom<NaiveDate>, [closure@./src/test/ui/impl-trait/example-calendar.rs:321:12: 321:36], i32>>, [closure@./src/test/ui/impl-trait/example-calendar.rs:403:17: 403:30], u32>>, [closure@./src/test/ui/impl-trait/example-calendar.rs:419:17: 419:45]>, [closure@./src/test/ui/impl-trait/example-calendar.rs:567:18: 567:34]>, [closure@./src/test/ui/impl-trait/example-calendar.rs:488:12: 510:6]>>"* %15, %"core::iter::adapters::chain::Chain<core::option::IntoIter<alloc::string::String>, core::iter::adapters::map::Map<core::iter::adapters::map::Map<GroupBy<core::iter::adapters::peekable::Peekable<InGroup<core::iter::adapters::peekable::Peekable<InGroup<core::ops::range::RangeFrom<NaiveDate>, [closure@./src/test/ui/impl-trait/example-calendar.rs:321:12: 321:36], i32>>, [closure@./src/test/ui/impl-trait/example-calendar.rs:403:17: 403:30], u32>>, [closure@./src/test/ui/impl-trait/example-calendar.rs:419:17: 419:45]>, [closure@./src/test/ui/impl-trait/example-calendar.rs:567:18: 567:34]>, [closure@./src/test/ui/impl-trait/example-calendar.rs:488:12: 510:6]>>.3"* %17
in function _ZN5alloc3vec18source_iter_marker24write_in_place_with_drop28_$u7b$$u7b$closure$u7d$$u7d$17hafca98b87cb714a6E
LLVM ERROR: Broken function found, compilation aborted!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    -ZpolymorphizeUnstable option: Polymorphization.A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.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.requires-debug-assertionsThis issue requires a build of rustc or tooling with debug-assertions in some wayrequires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions