-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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: broken mir with -Zinline-mir issue-50865-private-impl-trait/auxiliary/lib.rs #78442
Comments
Inlining exposes a use of unnormalized local in a call terminator (not sure if this is more of an issue with inlining or a validator): --- mir_dump/lib.bar.004-003.Inline.before.mir
+++ mir_dump/lib.bar.004-003.Inline.after.mir
@@ -1,50 +1,49 @@
fn bar(_1: P) -> () {
debug _baz => _1;
let mut _0: ();
let _2: ();
let mut _3: &impl std::ops::Fn<()>;
let _4: impl std::ops::Fn<()>;
let mut _5: ();
+ scope 1 (inlined <fn() {foo} as Fn<()>>::call - shim(fn() {foo})) {
+ }
bb1: {
_3 = &_4;
StorageLive(_5);
- _2 = <impl Fn<()> as Fn<()>>::call(move _3, move _5) -> [return: bb2, unwind: bb4];
+ _2 = move (*_3)() -> [return: bb5, unwind: bb3];
} Note: revision annotation doesn't work in an auxiliary file (so it isn't tested on CI with mir-opt-level=2). @rustbot modify labels: +A-mir-opt-inlining |
Normalize function type during validation During inlining, the callee body is normalized and has types revealed, but some of locals corresponding to the arguments might come from the caller body which is not. As a result the caller body does not pass validation without additional normalization. Closes rust-lang#78442.
Normalize function type during validation During inlining, the callee body is normalized and has types revealed, but some of locals corresponding to the arguments might come from the caller body which is not. As a result the caller body does not pass validation without additional normalization. Closes rust-lang#78442.
Normalize function type during validation During inlining, the callee body is normalized and has types revealed, but some of locals corresponding to the arguments might come from the caller body which is not. As a result the caller body does not pass validation without additional normalization. Closes rust-lang#78442.
…avidtwco Revert rust-lang#78969 "Normalize function type during validation" Closes rust-lang#79066. Reopens rust-lang#78442.
…avidtwco Revert rust-lang#78969 "Normalize function type during validation" Closes rust-lang#79066. Reopens rust-lang#78442.
…avidtwco Revert rust-lang#78969 "Normalize function type during validation" Closes rust-lang#79066. Reopens rust-lang#78442.
This ICEs again because the fix was reverted #79193 (comment) |
Due to #82736 this new requires ICE:
|
(FWIW |
Normalize MIR with RevealAll before optimizations. Fixes rust-lang#78442
Normalize MIR with RevealAll before optimizations. Fixes rust-lang#78442
Normalize MIR with RevealAll before optimizations. Fixes rust-lang#78442
Normalize MIR with RevealAll before optimizations. Fixes rust-lang#78442
Run reveal_all on MIR when inlining is activated. Fix logic error in rust-lang#85254 which prevented the pass from running when needed. Fixes rust-lang#78442 r? `@lcnr`
Previously: #77668
Now:
Code
Meta
rustc --version --verbose
:Error output
RUST_BACKTRACE=full /home/matthias/.rustup/toolchains/master/bin/rustc ./src/test/ui/issues/issue-50865-private-impl-trait/auxiliary/lib.rs -Zmir-opt-level=2
Backtrace
The text was updated successfully, but these errors were encountered: