Skip to content
Permalink
Browse files

Add a test for #22892

  • Loading branch information...
varkor committed Feb 25, 2019
1 parent e3297e7 commit 295b6fd0f77c3c63c9bdfcec16e603749e21bc2f
Showing with 17 additions and 0 deletions.
  1. +9 −0 src/test/ui/asm/invalid-inline-asm.rs
  2. +8 −0 src/test/ui/asm/invalid-inline-asm.stderr
@@ -0,0 +1,9 @@
#![feature(asm)]

fn main() {
let byte = 0;
let port = 0x80;

unsafe { asm!("out %al, %dx" :: "a" (byte), "d" (port) :: "volatile"); }
//~^ ERROR couldn't allocate input reg for constraint 'a'
}
@@ -0,0 +1,8 @@
error: couldn't allocate input reg for constraint 'a'
--> $DIR/invalid-inline-asm.rs:7:14
|
LL | unsafe { asm!("out %al, %dx" :: "a" (byte), "d" (port) :: "volatile"); }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

0 comments on commit 295b6fd

Please sign in to comment.
You can’t perform that action at this time.