]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Top level parsing test for asm!
authorjjasmine <tanghocle456@gmail.com>
Wed, 22 May 2024 00:54:57 +0000 (17:54 -0700)
committerArthur Cohen <arthur.cohen@embecosm.com>
Mon, 17 Mar 2025 15:35:38 +0000 (16:35 +0100)
gcc/testsuite/ChangeLog:

* rust/compile/inline_asm_ident_first.rs: New test.

gcc/testsuite/rust/compile/inline_asm_ident_first.rs [new file with mode: 0644]

diff --git a/gcc/testsuite/rust/compile/inline_asm_ident_first.rs b/gcc/testsuite/rust/compile/inline_asm_ident_first.rs
new file mode 100644 (file)
index 0000000..9a4eb7e
--- /dev/null
@@ -0,0 +1,10 @@
+#![feature(rustc_attrs)]
+
+#[rustc_builtin_macro]
+macro_rules! asm {
+    () => {}
+}
+
+fn main() {
+    asm!(i_am_a_dummy); // { dg-error "asm template must be a string literal" }
+}
\ No newline at end of file