-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rust nightly internal compiler error with inline assembly #38735
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
Comments
Generally the "m" constraint is broken. You should use an indirect memory constraint instead: fn lidt(idt_desc : CPUTableDescriptor) {
unsafe {
asm!(
"lidt $0"
:
: "*m"(&idt_desc)
:
);
}
} |
I was able to work around it by using a register operand, but the compiler told me it was a bug so I reported it. |
Great report. Thanks @iankronquist! |
Still crashing on rustc 1.23.0-nightly (8b22e70 2017-10-31) |
No longer reproduces:
|
Great! I'm going to close this, then. If anyone sees this come back up, please let me know and we can re-open! |
Interesting part of the code:
Expected behavior: it compiles with unused code warnings.
Actual behavior: internal compiler error.
Playground:
https://play.rust-lang.org/?gist=632e0e9fe4d75f417647ea847de2c97e&version=nightly&backtrace=0
Gist:
https://gist.github.com/anonymous/632e0e9fe4d75f417647ea847de2c97e
Meta
Version:
Backtrace:
The text was updated successfully, but these errors were encountered: