-
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
compiler abort in LLVM code when using a newtype-wrapper as an argument #15402
Comments
Just ran into this again, however for a lot of this year this worked, as I wrote some code that does this. |
This once again does not ICE: #![feature(asm)]
pub struct Wrapper(u32);
fn main() {
let mut value: Wrapper = Wrapper(7);
unsafe {
asm!("mov %eax, $0" : "+r"(value));
}
} @steveklabnik E-needstest? |
With LLVM assertions enabled, this still fails with the same error message. |
…argument' ICE Reference rust-lang/rust#15402
…argument' ICE Reference rust-lang/rust#15402
The error depends on the exact asm invocation. #![feature(asm)]
#[repr(packed)]
struct Bitfield<T>(T);
fn test()->(Bitfield<u32>,Bitfield<u32>) {
let mut out=(Bitfield(0),Bitfield(0));
unsafe{asm!("" : "={eax}"(out.0), "={ebx}"(out.1))};
out
}
fn main() {
test();
} yields:
While this #![feature(asm)]
#[repr(packed)]
struct Bitfield<T>(T);
fn test()->(Bitfield<u32>,Bitfield<u32>) {
let mut out=(Bitfield(0),Bitfield(0));
unsafe{asm!("" : "={eax}"(out.0))};
out
}
fn main() {
test();
} yields:
|
Triage: still reproduces
|
This no longer ICEs! |
Because LLVM assertions were disabled on nightly #45810 |
ICE is dependent on |
This issue does not apply to the new The legacy |
The legacy `llvm_asm!` macro is deprecated and no longer maintained. Issue: rust-lang/rust#15402
The legacy `llvm_asm!` macro is deprecated and no longer maintained. Issue: rust-lang/rust#15402
The following program will cause an abort in llvm/lib/IR/InlineAsm.cpp:
The error message I get is:
I am using the rust nightly build version 201407030406
67776bautopic.The text was updated successfully, but these errors were encountered: