aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/hir/tree/rust-hir.cc4
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check-expr.cc4
-rw-r--r--gcc/testsuite/rust/compile/inline_asm_compile_nop.rs12
3 files changed, 16 insertions, 4 deletions
diff --git a/gcc/rust/hir/tree/rust-hir.cc b/gcc/rust/hir/tree/rust-hir.cc
index 8e0d444..f05e506 100644
--- a/gcc/rust/hir/tree/rust-hir.cc
+++ b/gcc/rust/hir/tree/rust-hir.cc
@@ -3833,7 +3833,9 @@ BorrowExpr::accept_vis (HIRFullVisitor &vis)
void
InlineAsm::accept_vis (HIRExpressionVisitor &vis)
-{}
+{
+ vis.visit (*this);
+}
void
InlineAsm::accept_vis (HIRFullVisitor &vis)
diff --git a/gcc/rust/typecheck/rust-hir-type-check-expr.cc b/gcc/rust/typecheck/rust-hir-type-check-expr.cc
index 6635f13..1197916 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-expr.cc
+++ b/gcc/rust/typecheck/rust-hir-type-check-expr.cc
@@ -777,9 +777,7 @@ TypeCheckExpr::visit (HIR::RangeToExpr &expr)
void
TypeCheckExpr::visit (HIR::InlineAsm &expr)
-{
- return;
-}
+{}
void
TypeCheckExpr::visit (HIR::RangeFullExpr &expr)
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