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

Infinite loop when inlining #78573

Closed
tmiasko opened this issue Oct 30, 2020 · 0 comments · Fixed by #78580
Closed

Infinite loop when inlining #78573

tmiasko opened this issue Oct 30, 2020 · 0 comments · Fixed by #78580
Labels
A-mir-opt Area: MIR optimizations A-mir-opt-inlining Area: MIR inlining C-bug Category: This is a bug. I-hang Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@tmiasko
Copy link
Contributor

tmiasko commented Oct 30, 2020

fn main() {
    f();
}

#[inline]
fn a<T: FnOnce()>(t: T) {
    t();
}

#[inline]
fn f() {
    a(f);
}
$ rustc -Zmir-opt-level=2 a.rs
...

It was already possible before, but #68965 made it much easier to trigger.

@rustbot modify labels: +A-mir-opt, +A-mir-opt-inlining

@tmiasko tmiasko added the C-bug Category: This is a bug. label Oct 30, 2020
@rustbot rustbot added A-mir-opt Area: MIR optimizations A-mir-opt-inlining Area: MIR inlining labels Oct 30, 2020
@jonas-schievink jonas-schievink added I-hang Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 30, 2020
@bors bors closed this as completed in ee1fedf Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-mir-opt Area: MIR optimizations A-mir-opt-inlining Area: MIR inlining C-bug Category: This is a bug. I-hang Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants