File tree Expand file tree Collapse file tree 3 files changed +29
-2
lines changed
librustc_codegen_llvm/llvm Expand file tree Collapse file tree 3 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ impl OptimizationDiagnostic<'ll> {
8888pub struct InlineAsmDiagnostic < ' ll > {
8989 pub cookie : c_uint ,
9090 pub message : & ' ll Twine ,
91- pub instruction : & ' ll Value ,
91+ pub instruction : Option < & ' ll Value > ,
9292}
9393
9494impl InlineAsmDiagnostic < ' ll > {
@@ -107,7 +107,7 @@ impl InlineAsmDiagnostic<'ll> {
107107 InlineAsmDiagnostic {
108108 cookie,
109109 message : message. unwrap ( ) ,
110- instruction : instruction . unwrap ( ) ,
110+ instruction,
111111 }
112112 }
113113}
Original file line number Diff line number Diff line change 1+ #![ feature( asm) ]
2+
3+ // only-x86_64
4+
5+ fn main ( ) {
6+ unsafe {
7+ asm ! ( "int $3" ) ; //~ ERROR too few operands for instruction
8+ //~| ERROR invalid operand in inline asm
9+ }
10+ }
Original file line number Diff line number Diff line change 1+ error: invalid operand in inline asm: 'int $3'
2+ --> $DIR/issue-23458.rs:7:9
3+ |
4+ LL | asm!("int $3");
5+ | ^^^^^^^^^^^^^^^
6+
7+ error: <inline asm>:1:2: error: too few operands for instruction
8+ int
9+ ^
10+
11+ --> $DIR/issue-23458.rs:7:9
12+ |
13+ LL | asm!("int $3");
14+ | ^^^^^^^^^^^^^^^
15+
16+ error: aborting due to 2 previous errors
17+
You can’t perform that action at this time.
0 commit comments