https://gcc.gnu.org/g:95674a0a358142e2ac38f827abe28998d8f39438

commit 95674a0a358142e2ac38f827abe28998d8f39438
Author: badumbatish <tanghocle...@gmail.com>
Date:   Sun Jul 21 15:13:25 2024 -0700

    Added new test for prep of output {}
    
    gcc/testsuite/ChangeLog:
    
            * rust/compile/inline_asm_parse_output_operand.rs: New test.

Diff:
---
 .../rust/compile/inline_asm_parse_output_operand.rs    | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gcc/testsuite/rust/compile/inline_asm_parse_output_operand.rs 
b/gcc/testsuite/rust/compile/inline_asm_parse_output_operand.rs
new file mode 100644
index 000000000000..3134c73b3c29
--- /dev/null
+++ b/gcc/testsuite/rust/compile/inline_asm_parse_output_operand.rs
@@ -0,0 +1,18 @@
+#![feature(rustc_attrs)]
+
+#[rustc_builtin_macro]
+macro_rules! asm {
+    () => {};
+}
+
+fn main() {
+    let mut _num1: i32 = 10;
+    let mut _num2: i32 = 10;
+    unsafe {
+        asm!(
+            "mov {0}, 4",
+            out(reg) _num1,
+            out(reg) _num2,
+        );
+    }
+}

Reply via email to