Skip to content

Commit 5917d9f

Browse files
committed
Add a test for rust-lang#28587
1 parent 295b6fd commit 5917d9f

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#![feature(asm)]
2+
3+
fn main() {
4+
let a: usize;
5+
6+
unsafe {
7+
asm!("" : "=d"(a) : : : );
8+
//~^ ERROR couldn't allocate output register for constraint 'd'
9+
}
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
error: couldn't allocate output register for constraint 'd'
2+
--> $DIR/invalid-inline-asm-2.rs:7:9
3+
|
4+
LL | asm!("" : "=d"(a) : : : );
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
6+
7+
error: aborting due to previous error
8+

0 commit comments

Comments
 (0)