Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
matthiaskrgr opened this issue Oct 23, 2021 · 1 comment
Labels
-Zpolymorphize Unstable option: Polymorphization. A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-debug-assertions This issue requires a build of rustc or tooling with debug-assertions in some way requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

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!
@matthiaskrgr matthiaskrgr added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 23, 2021
@matthiaskrgr matthiaskrgr added requires-debug-assertions This issue requires a build of rustc or tooling with debug-assertions in some way requires-nightly This issue requires a nightly compiler in some way. labels Jun 4, 2022
@matthiaskrgr
Copy link
Member Author

Seems to be fixed in nightly rustc 1.67.0-nightly (09508489e 2022-11-04) with debug assertions

@matthiaskrgr matthiaskrgr added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Nov 6, 2022
@workingjubilee workingjubilee added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Mar 4, 2023
@fmease fmease added the -Zpolymorphize Unstable option: Polymorphization. label Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Zpolymorphize Unstable option: Polymorphization. A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ requires-debug-assertions This issue requires a build of rustc or tooling with debug-assertions in some way requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants