-
Notifications
You must be signed in to change notification settings - Fork 13k
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
ICE: "Got a scalar pair where a scalar was expected" -Zmir-opt-level=4 --emit=mir #96169
Comments
Also reproducible in miri: use std::fmt::Debug;
use std::ptr;
fn main() {
let a: *const dyn Debug = &1 as &dyn Debug;
let b: *const dyn Debug = &1 as &dyn Debug;
let _ = a < b;
} |
The second one looks very different from the first. That looks like a bug in the Miri implementation of |
I cannot reproduce the original example any more. And in fact The second one still ICEs. |
@bjorn3 do you know the codegen behavior of |
Actually testing indicates that it is... lexicographic?!? |
Indeed. This is the actual implementation: rust/compiler/rustc_codegen_ssa/src/mir/rvalue.rs Lines 625 to 639 in 5b8cf49
|
Example #1 still crashes with -Zmir-opt-level=4 as noted in the title, reopening. |
I tried it with opt-level 4 and it didn't crash for me... which rustc are you using?
|
did you also pass --emit=mir ? |
D'oh, I should read what you are saying, sorry... |
Wow, that backtrace is completely useless. All the relevant line numbers are missing. I added some
|
fix ICE in ConstProp Fixes rust-lang#96169
Code
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: