-
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
Debuginfo is emitted for some unreachable code, crashes #21559
Comments
Can you share the code please? |
Maybe it is a cargo issue. I was using cargo build but rustc worked fn main(){
} |
The Cargo build adds |
What version of rustc are you using ( |
I am using the latest version (installed today). |
Yes 20312 looks exactly the same. |
Hm, maybe the LLVM basic-blocks in the nested expressions are not marked as unreachable during trans? |
PR #23066 which fixes this (but needs close review for unintended side-effects) is open for a while now. Nothing new on this issue otherwise. |
…pnkfelix This PR solves rust-lang#21559 by making sure that unreachable if-expressions are not further translated. Could someone who knows their way around `trans` take a look at the changes in `controlflow.rs`? I'm not sure if any other code relies on any side-effects of translating unreachable things. cc @nikomatsakis @nrc @eddyb
Seems to be fixed. |
Thanks @pmarcelll! |
error: internal compiler error: debuginfo::create_local_var_metadata() - Referenced variable location is not an alloca!
Test.rs:131 let take = if num_items <= split_by {
^~~~
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with
RUST_BACKTRACE=1
for a backtracethread 'rustc' panicked at 'Box', C:\bot\slave\nightly-dist-rustc-win-64\build\src\libsyntax\diagnostic.rs:130
The text was updated successfully, but these errors were encountered: