[COMMITTED 083/145] gccrs: Add a simple no-op test for asm!

arthur.cohen@embecosm.com arthur.cohen@embecosm.com
Mon Mar 17 15:32:41 GMT 2025


From: jjasmine <tanghocle456@gmail.com>

gcc/testsuite/ChangeLog:

	* rust/compile/inline_asm_nop.rs: Simple test for asm!
---
 gcc/testsuite/rust/compile/inline_asm_nop.rs | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 gcc/testsuite/rust/compile/inline_asm_nop.rs

diff --git a/gcc/testsuite/rust/compile/inline_asm_nop.rs b/gcc/testsuite/rust/compile/inline_asm_nop.rs
new file mode 100644
index 00000000000..ffe3161cd73
--- /dev/null
+++ b/gcc/testsuite/rust/compile/inline_asm_nop.rs
@@ -0,0 +1,10 @@
+#![feature(rustc_attrs)]
+
+#[rustc_builtin_macro]
+macro_rules! asm {
+    () => {}
+}
+
+fn main() {
+    asm!("nop");
+}
-- 
2.45.2



More information about the Gcc-rust mailing list