From 6b2672dcaa1571a23e741a34adeabd0eb31559b3 Mon Sep 17 00:00:00 2001 From: Bruno Tavares Date: Fri, 23 Oct 2015 18:41:11 -0200 Subject: [PATCH] Adds 'compiler abort in LLVM code when using a newtype-wrapper as an argument' ICE Reference rust-lang/rust#15402 --- src/15402.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/15402.rs diff --git a/src/15402.rs b/src/15402.rs new file mode 100644 index 00000000..4c8ffa86 --- /dev/null +++ b/src/15402.rs @@ -0,0 +1,10 @@ +#![feature(asm)] + +pub struct Wrapper(u32); + +fn main() { + let mut value: Wrapper = Wrapper(7); + unsafe { + asm!("mov %eax, $0" : "+r"(value)); + } +}