diff options
author | jjasmine <tanghocle456@gmail.com> | 2024-06-22 14:33:47 -0700 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-03-19 15:32:05 +0100 |
commit | 86c8894ab896ffc29bbed5fc7faeff022e86ad22 (patch) | |
tree | ec04428191931856cec52139c5b18ec8caf9d4a7 /gcc/testsuite/rust/compile | |
parent | 51f430a4642339af721dbc09af8db39aef8c744c (diff) | |
download | gcc-86c8894ab896ffc29bbed5fc7faeff022e86ad22.zip gcc-86c8894ab896ffc29bbed5fc7faeff022e86ad22.tar.gz gcc-86c8894ab896ffc29bbed5fc7faeff022e86ad22.tar.bz2 |
gccrs: Make sure CompileExpr::visit is reached
gcc/rust/ChangeLog:
* hir/tree/rust-hir.cc (InlineAsm::accept_vis):
Make sure CompileExpr::visit is reached
* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit):
Likewise
gcc/testsuite/ChangeLog:
* rust/compile/inline_asm_compile_nop.rs: New test.
Diffstat (limited to 'gcc/testsuite/rust/compile')
-rw-r--r-- | gcc/testsuite/rust/compile/inline_asm_compile_nop.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/rust/compile/inline_asm_compile_nop.rs b/gcc/testsuite/rust/compile/inline_asm_compile_nop.rs new file mode 100644 index 0000000..c49667c --- /dev/null +++ b/gcc/testsuite/rust/compile/inline_asm_compile_nop.rs @@ -0,0 +1,12 @@ +#![feature(rustc_attrs)] + +#[rustc_builtin_macro] +macro_rules! asm { + () => {} +} + +fn main() { + unsafe { + asm!("nop"); + } +}
\ No newline at end of file |