From: badumbatish Date: Sun, 21 Jul 2024 22:13:25 +0000 (-0700) Subject: Added new test for prep of output {} X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95674a0a358142e2ac38f827abe28998d8f39438;p=thirdparty%2Fgcc.git Added new test for prep of output {} gcc/testsuite/ChangeLog: * rust/compile/inline_asm_parse_output_operand.rs: New test. --- 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, + ); + } +}