Skip to content

Commit

Permalink
Adds 'compiler abort in LLVM code when using a newtype-wrapper as an …
Browse files Browse the repository at this point in the history
…argument' ICE

Reference rust-lang/rust#15402
  • Loading branch information
Bruno Tavares committed Oct 23, 2015
1 parent 10e8088 commit 6b2672d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/15402.rs
Original file line number Diff line number Diff line change
@@ -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));
}
}

0 comments on commit 6b2672d

Please sign in to comment.