Skip to content

Commit dd0f98b

Browse files
committed
Add test for issue-51431
1 parent a239c8d commit dd0f98b

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/test/ui/asm/issue-51431.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// ignore-emscripten no asm! support
2+
3+
#![feature(asm)]
4+
5+
fn main() {
6+
unsafe {
7+
asm! {"mov $0,$1"::"0"("bx"),"1"(0x00)}
8+
//~^ ERROR: invalid value for constraint in inline assembly
9+
}
10+
}

src/test/ui/asm/issue-51431.stderr

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
error[E0669]: invalid value for constraint in inline assembly
2+
--> $DIR/issue-51431.rs:7:32
3+
|
4+
LL | asm! {"mov $0,$1"::"0"("bx"),"1"(0x00)}
5+
| ^^^^
6+
7+
error: aborting due to previous error
8+

0 commit comments

Comments
 (0)