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

Assertion DISubprogram(Scope).describes(MF->getFunction()) failed #24220

Closed
valenting opened this issue Apr 9, 2015 · 5 comments
Closed

Assertion DISubprogram(Scope).describes(MF->getFunction()) failed #24220

valenting opened this issue Apr 9, 2015 · 5 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@valenting
Copy link

I get this error:

src/lib.rs:57:7: 57:10 warning: unused variable: `enc`, #[warn(unused_variables)] on by default
src/lib.rs:57   let enc = EncodingOverride::lookup("ascii".as_bytes());
                    ^~~
rustc: /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/llvm/lib/CodeGen/LexicalScopes.cpp:179: llvm::LexicalScope* llvm::LexicalScopes::getOrCreateRegularScope(llvm::MDNode*): Assertion `DISubprogram(Scope).describes(MF->getFunction())' failed.
Could not compile `rust_url_capi`.

It seems to be a compiler bug.
It occurs at this line, since commenting it seems to fix the problem:
https://github.com/valenting/rust-url-capi/blob/64c0a049bbffdb2676d39e0bc97ba0c5abb66ba6/src/lib.rs#L57

My guess is that the problem occurs because from rust_url_capi lib.rs:57-> rust-url encoding.rs:44 -> rust-encoding label.rs:13

@Aatch
Copy link
Contributor

Aatch commented Apr 9, 2015

What happens if you use enc? It's probably related to that.

@valenting
Copy link
Author

Still fails. I tried to use it in a large number of ways, thinking I was doing something wrong. Didn't work.
You can clone https://github.com/valenting/rust-url-capi to see it happening.

@dotdash
Copy link
Contributor

dotdash commented Apr 9, 2015

Looks like a dupe of #23566. Can you confirm that it doesn't happen if you disable LTO?

@steveklabnik steveklabnik added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Apr 9, 2015
@valenting
Copy link
Author

Yes, it only happens with LTO enabled.

@dotdash
Copy link
Contributor

dotdash commented Apr 9, 2015

Thanks! Closing as a duplicate of #23566 then.

@dotdash dotdash closed this as completed Apr 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

4 participants