Skip to content

Commit

Permalink
Add a test for rust-lang#28587
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed Feb 27, 2019
1 parent 5fb2d8b commit 0976e5e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/test/ui/asm/invalid-inline-asm-2.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#![feature(asm)]

fn main() {
let a: usize;

unsafe {
asm!("" : "=d"(a) : : : );
//~^ ERROR couldn't allocate output register for constraint 'd'
}
}
8 changes: 8 additions & 0 deletions src/test/ui/asm/invalid-inline-asm-2.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
error: couldn't allocate output register for constraint 'd'
--> $DIR/invalid-inline-asm-2.rs:7:9
|
LL | asm!("" : "=d"(a) : : : );
| ^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

0 comments on commit 0976e5e

Please sign in to comment.