Add a test for #22892

This commit is contained in:
varkor 2019-02-25 23:56:10 +00:00
parent e3297e7ce3
commit 295b6fd0f7
2 changed files with 17 additions and 0 deletions

View File

@ -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'
}

View File

@ -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