Add a test for #28587
This commit is contained in:
parent
295b6fd0f7
commit
5917d9fc62
10
src/test/ui/asm/invalid-inline-asm-2.rs
Normal file
10
src/test/ui/asm/invalid-inline-asm-2.rs
Normal file
@ -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
src/test/ui/asm/invalid-inline-asm-2.stderr
Normal file
8
src/test/ui/asm/invalid-inline-asm-2.stderr
Normal file
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user