Closed
Description
The following program will cause an abort in llvm/lib/IR/InlineAsm.cpp:
#![feature(asm)]
pub struct Wrapper(uint);
fn main() {
let mut value: Wrapper = Wrapper(7);
unsafe {
asm!("mov %eax, $0" : "+r"(value));
}
}
The error message I get is:
rustc: /build/buildd/rust-nightly-201407030406~67776ba~utopic/src/llvm/lib/IR/InlineAsm.cpp:47: llvm::InlineAsm::InlineAsm(llvm::PointerType*, const string&, const string&, bool, bool, llvm::InlineAsm::AsmDialect): Assertion `Verify(getFunctionType(), constraints) && "Function type not legal for constraints!"' failed.
Aborted (core dumped)
I am using the rust nightly build version 20140703040667776bautopic.